Pipe attributes 001
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" name="main" version="3.0">
<p:output port="result"/>
<p:identity name="one">
<p:with-input port="source">
<t:doc>One</t:doc>
</p:with-input>
</p:identity>
<p:identity name="two">
<p:with-input port="source">
<t:doc>Two</t:doc>
</p:with-input>
</p:identity>
<p:identity name="three">
<p:with-input port="source">
<t:doc>Three</t:doc>
</p:with-input>
</p:identity>
<p:identity name="combined">
<p:with-input port="source"
pipe="@three @two @one"/>
</p:identity>
<p:wrap-sequence wrapper="docs"/>
</p:declare-step>
Result
<docs xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:doc>Three</t:doc>
<t:doc>Two</t:doc>
<t:doc>One</t:doc>
</docs>
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:ns prefix="c"
uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/*">
<s:assert test="self::docs">The pipeline root is not docs.</s:assert>
</s:rule>
<s:rule context="/docs">
<s:assert test="doc[1] = 'Three'">The first document isn’t Three</s:assert>
<s:assert test="doc[2] = 'Two'">The second document isn’t Two</s:assert>
<s:assert test="doc[3] = 'One'">The third document isn’t One</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 18 Feb 2018, Achim Berndzen
- Reversed @pipe-substructure. (->Prague 2018)
- 29 Dec 2017, Achim Berndzen
- Creating new tests, extending rng and corrected xproc's test
- 24 Sep 2017, Norman Walsh
- Port my test suite; add documentation and schemas