nw-validate-with-xsd-006
Check that schema module resolution works correctly.
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="pipeline" version="3.0">
<p:output port="result"/>
<p:validate-with-xml-schema name="validate"
assert-valid="true">
<p:with-input port="source">
<CONGRATULATIONS>It worked</CONGRATULATIONS>
</p:with-input>
<p:with-input port="schema"
href="../documents/congrats.xsd"/>
</p:validate-with-xml-schema>
</p:declare-step>
Result
<CONGRATULATIONS xmlns:t="http://xproc.org/ns/testsuite/3.0">It worked</CONGRATULATIONS>
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="CONGRATULATIONS">The test failed?</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 14 Jun 2025, Norm Tovey-Walsh
- Initial commit.