load 003 (AB)
Testing p:load
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:load href="../documents/load-document-001.xml"/>
</p:declare-step>
Result
<doc xmlns:t="http://xproc.org/ns/testsuite/3.0">
<p>This is a test document</p>
</doc>
Schematron checks
<s:schema 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 document root is not doc.</s:assert>
<s:assert test="doc/p/text()='This is a test document'">Document does not have a p element with 'This is a test document'</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 10 Jun 2021, Achim Berndzen
- Added attribute 'queryBinding' to schematron's schema.
- 21 Dec 2019, Achim Berndzen
- Ported test for p:load from 1.0 test suite.