Test for p:insert 012 (AB)

Tests p:insert element as first child of document node.

Test ab-insert-012.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="/" position="first-child">
                <p:with-input>
                    <doc2 xmlns=""/>
                </p:with-input>
                <p:with-input port="insertion">
                    <doc1 xmlns=""/>
                </p:with-input>            
            </p:insert>
            
            <p:wrap-sequence wrapper="wrap"/>
        </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="wrap">The root element is not 'wrap'.</s:assert>
                    <s:assert test="wrap/*[1]/name()='doc1'">The first child of root is not 'doc1'.</s:assert>
                    <s:assert test="wrap/*[2]/name()='doc2'">The second child of root is not 'doc2'.</s:assert>
                    <s:assert test="count(/wrap/*)=2">The root does not have exactly two children.</s:assert>
                </s:rule>
            </s:pattern>
        </s:schema>
    

Revision history

23 Mar 2019, Achim Berndzen

new tests.