ab-validate-with-xsd-018

Tests p:validate-with-xml-schema with use-location-hints.

Test ab-validate-with-xsd-018.xml is expected to pass.

It requires the following features: p-validate-with-xsd.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 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">
         <xsd:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://some-namespace" elementFormDefault="qualified">
            <xsd:element name="other-doc" type="xs:string"/>
         </xsd:schema>
      </p:with-input>
   </p:validate-with-xml-schema>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" 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.