ab-validate-with-xsd-019
Tests p:validate-with-xml-schema with use-location-hints.
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"
exclude-inline-prefixes="#all">
<p:output port="result"/>
<p:validate-with-xml-schema use-location-hints="true">
<p:with-input>
<test:doc xmlns:test="http://test.test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://test.test ../documents/test.xsd"/>
</p:with-input>
<p:with-input port="schema">
<p:empty/>
</p:with-input>
</p:validate-with-xml-schema>
</p:declare-step>
Result
<test:doc xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:test="http://test.test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://test.test ../documents/test.xsd"/>
Schematron checks
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
<s:ns uri="http://test.test" prefix="pre"/>
<s:pattern>
<s:rule context="/">
<s:assert test="pre:doc">The root element is not 'doc'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 24 May 2022, Achim Berndzen
- Initial version.