Test for p:insert 010 (AB)

Tests p:insert doc as last child of an empty root.

Test ab-insert-010.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="doc" position="last-child">
      <p:with-input>
         <doc/>
      </p:with-input>
      <p:with-input port="insertion">
         <p>New paragraph.</p>
      </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="doc">The root element is not 'doc'.</s:assert>
         <s:assert test="doc/p">The root element does not have a child 'p'.</s:assert>
         <s:assert test="doc/p/text()='New paragraph.'">The text of doc/p is not 'New paragraph.'</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