Test for p:insert 009 (AB)

Tests p:insert multiple documents after a specific PI

Test ab-insert-009.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="processing-instruction('that')" position="after">
                     <?that is a pi?>
      <p:with-input port="insertion">
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:rule context="/">
         <s:assert test="root">The root element is not 'root'.</s:assert>
         <s:assert test="root/child::node()[1] instance of text()">First child is not text().</s:assert>
         <s:assert test="root/child::node()[2] instance of processing-instruction('that')">Second child is not PI.</s:assert>
         <s:assert test="root/*[1]/name()='root1'">Name of the first element of root is not 'root1'.</s:assert>
         <s:assert test="root/*[2]/name()='root2'">Name of the second element of root is not 'root2'.</s:assert>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

30 Jun 2019, Achim Berndzen

Fixed schematron to cover trailing whitespace node.

22 Mar 2019, Achim Berndzen

Ported tests from 1.0 test suite