Test for p:insert 006 (AB)

Tests p:insert multiple documents into a populated child element

Test ab-insert-006.xml is expected to pass.

The pipeline


        <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
            
            <p:output port="result"/>
            
            <p:insert match="a" position="first-child">
                <p:with-input>
                    <p:inline>
                        <root xmlns="">
                            <a>
                                <d/>
                            </a>
                        </root>    
                    </p:inline>
                </p:with-input>
                <p:with-input port="insertion">
                    <p:inline>
                        <b xmlns=""/>
                    </p:inline>
                    <p:inline>
                        <c xmlns=""/>
                    </p:inline>
                </p:with-input>            
            </p:insert>
        </p:declare-step>  
    
MorganaXProc passing XML Calabash failing

Schematron validation


        <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
            <s:pattern>
                <s:rule context="/">
                    <s:assert test="root">The root element is not 'root'.</s:assert>
                    <s:assert test="root/a">Root element does not have child element 'a'.</s:assert>
                    <s:assert test="root/a/*[1]/name()='b'">Name of the first element of a is not 'b'.</s:assert>
                    <s:assert test="root/a/*[2]/name()='c'">Name of the second element of a is not 'c'.</s:assert>
                    <s:assert test="root/a/*[3]/name()='d'">Name of the third element of a is not 'd'.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    

Revision history

22 Mar 2019, Achim Berndzen

Ported tests from 1.0 test suite