Test for p:insert 011 (AB)

Tests p:insert on multiple positions on different levels.

Test ab-insert-011.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>
                    <doc xmlns="">
                        <a>
                            <a>
                                <a/>
                            </a>
                        </a>
                    </doc>
                </p:with-input>
                <p:with-input port="insertion">
                    <b xmlns=""/>
                </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="doc">The root element is not 'doc'.</s:assert>
                    <s:assert test="doc/a">The root does not have a child 'a'.</s:assert>
                    <s:assert test="doc/a/*[1]/name()='b'">The first child of doc/a is not 'b'.</s:assert>
                    <s:assert test="doc/a/*[2]/name()='a'">The second child of doc/a is not 'a'.</s:assert>
                    <s:assert test="doc/a/a/*[1]/name()='b'">The first child of doc/a/a is not 'b'.</s:assert>
                    <s:assert test="doc/a/a/*[2]/name()='a'">The second child of doc/a/a is not 'a'.</s:assert>
                    <s:assert test="doc/a/a/a/b">Element doc/a/a/a does not have a child 'b'.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    

Revision history

23 Mar 2019, Achim Berndzen

new tests.