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">
      <p:with-input port="insertion">
   <p:wrap-sequence wrapper="wrap"/>
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="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

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

23 Mar 2019, Achim Berndzen

new tests.