Test for p:insert 006 (AB)

Tests p:insert multiple documents into a populated child element

Test ab-insert-006.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>
         <p:inline>
            <root>
               <a>
                  <d/>
               </a>
            </root>
         </p:inline>
      </p:with-input>
      <p:with-input port="insertion">
         <p:inline>
            <b/>
         </p:inline>
         <p:inline>
            <c/>
         </p:inline>
      </p:with-input>
   </p:insert>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="root">The root element is not 'root'.</s:assert>
         <s:assert test="root/a">Root element does not have child element 'a'.</s:assert>
         <s:assert test="root/a/*[1]/name()='b'">Name of the first element of a is not 'b'.</s:assert>
         <s:assert test="root/a/*[2]/name()='c'">Name of the second element of a is not 'c'.</s:assert>
         <s:assert test="root/a/*[3]/name()='d'">Name of the third element of a is not 'd'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

22 Mar 2019, Achim Berndzen

Ported tests from 1.0 test suite