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">
                    <doc2 xmlns=""/>
                <p:with-input port="insertion">
                    <doc1 xmlns=""/>
            <p:wrap-sequence wrapper="wrap"/>
MorganaXProc passing XML Calabash passing

Schematron validation

        <s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron">
                <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>

Revision history

23 Mar 2019, Achim Berndzen

new tests.