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">
                    <doc xmlns="">
                <p:with-input port="insertion">
                    <b xmlns=""/>
MorganaXProc passing XML Calabash passing

Schematron validation

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

Revision history

23 Mar 2019, Achim Berndzen

new tests.