Input 024

Tests tvt on p:input's default binding

Test is expected to pass.

The pipeline

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
   <p:option name="option" select="'option value'"
             static="true"/>
   <p:input port="source">
      <doc>{$option}</doc>
   </p:input>
   <p:output port="result"/>
   <p:identity/>
</p:declare-step>

Result

<doc xmlns:t="http://xproc.org/ns/testsuite/3.0">option value</doc>

Schematron checks

<s:schema xmlns="http://www.w3.org/1999/xhtml"
          xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
          queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="doc">The root is not doc.</s:assert>
         <s:assert test="count(doc/node())=1">The root element does not have exactly one child.</s:assert>
         <s:assert test="doc/text() = 'option value'">doc-element does not contain 'option value'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen
Added attribute 'queryBinding' to schematron's schema.
15 Sep 2018, Achim Berndzen
Some tests changed and new tests
18 Mar 2018, Achim Berndzen
New tests. Some tests changed to new order in p:pipe