nw-import-001
Test circular imports.
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" xmlns:test="http://test" version="3.0">
<p:import href="../pipelines/nw-import-001-lib1.xpl"/>
<p:output port="result"/>
<test:join1/>
<p:wrap-sequence wrapper="wrapper"/>
</p:declare-step>
Result
<wrapper xmlns:t="http://xproc.org/ns/testsuite/3.0">
<one xmlns:test="http://test"/>
<two xmlns:test="http://test"/>
</wrapper>
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="ex" uri="http://example.com/sample"/>
<s:pattern>
<s:rule context="/">
<s:assert test="wrapper">The pipeline root is not “wrapper”.</s:assert>
</s:rule>
<s:rule context="wrapper">
<s:assert test="one">There’s no “one” element.</s:assert>
<s:assert test="two">There’s no “two” element.</s:assert>
<s:assert test="two/preceding-sibling::one">The “two” document precedes the “one” document.</s:assert>
<s:assert test="count(one)=1">There’s more than one “one”.</s:assert>
<s:assert test="count(two)=1">There’s more than one “two”.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 24 Dec 2024, Norm Tovey-Walsh
- Fixed a typo in the test’s title.
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 13 Jul 2019, Norman Walsh
- Initial publication