p:unwrap 001 (AB)

Tests p:unwrap

Test ab-unwrap-001.xml is expected to pass.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
   <p:input port="source"/>
   <p:output port="result"/>
   <p:unwrap match="p:unwrap"/>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Inputs

port = source


<p:pipeline xmlns:p="http://www.w3.org/ns/xproc" name="pipeline">
   <p:unwrap>
      <p:with-option name="match" value="p:unwrap"/>
   </p:unwrap>
</p:pipeline>

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="/p:pipeline">Root element is not 'p:pipeline'.</s:assert>
         <s:assert test="count(/p:pipeline/*)=1">Root element should have exactly one child.</s:assert>
         <s:assert test="/p:pipeline/p:with-option">Root element should have child 'p:with-option'.</s:assert>
         <s:assert test="/p:pipeline/p:with-option/@name='match'">Element 'p:with-option' should have attribute 'name'='match'.</s:assert>
         <s:assert test="/p:pipeline/p:with-option/@value='p:unwrap'">Element 'p:with-option' should have attribute 'value'='p:unwrap'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

16 Jun 2019, Achim Berndzen

Tests for p:unwrap (Partly ported from 1.0)