Test for p:insert 005 (AB)

Tests p:insert multiple documents before a specific PI

Test ab-insert-005.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="processing-instruction('that')" position="before">
                <p:with-input>
                    <p:inline>
                        <root xmlns="">
                            
                        </root>    
                    </p:inline>
                </p:with-input>
                <p:with-input port="insertion">
                    <p:inline>
                        <root1 xmlns=""/>
                    </p:inline>
                    <p:inline>
                        <root2 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/*[1]/name()='root1'">Name of the first element of root is not 'root1'.</s:assert>
                    <s:assert test="root/*[2]/name()='root2'">Name of the second element of root is not 'root2'.</s:assert>
                    <s:assert test="root/root2/following-sibling::processing-instruction('that')">There is no PI behind the second inserted document.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    

Revision history

22 Mar 2019, Achim Berndzen

Ported tests from 1.0 test suite