with-input-052
Tests p:with-input: implicit inline with two documents
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:output port="result"/>
<p:identity>
<p:with-input>
<doc/>
<doc2/>
</p:with-input>
</p:identity>
<p:wrap-sequence wrapper="wrapped"/>
</p:declare-step>
Result
<wrapped xmlns:t="http://xproc.org/ns/testsuite/3.0">
<doc/>
<doc2/>
</wrapped>
Schematron checks
<s:schema xmlns:p="http://www.w3.org/ns/xproc"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:ns prefix="p" uri="http://www.w3.org/ns/xproc"/>
<s:pattern>
<s:rule context="/*">
<s:assert test="self::wrapped">The pipeline root is not wrapped.</s:assert>
<s:assert test="name(self::wrapped/child::*[1])='doc'">The first child is not 'doc'.</s:assert>
<s:assert test="name(self::wrapped/child::*[2])='doc2'">The second child is not 'doc2'.</s:assert>
<s:assert test="count(self::wrapped//*)=2">'wrapped' does not have exactly two child elements.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 02 Feb 2018, Achim Berndzen
- added new tests
- 29 Dec 2017, Achim Berndzen
- Creating new tests, extending rng and corrected xproc's test