ab-validate-with-xsd-016

Test p:validate-with-xml-schema with importing schemas via namespace.

Test ab-validate-with-xsd-016.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">
   <p:input port="source">
      <p:inline content-type="application/xml">
         <a:foo xmlns:a="http://dummy/a">
            <b:bar xmlns:b="http://dummy/b"/>
         </a:foo>
      </p:inline>
   </p:input>
   <p:output port="result"/>
   <p:validate-with-xml-schema name="main">
      <p:with-input port="schema">
         <p:document href="../documents/schema-a.xsd"/>
      </p:with-input>
   </p:validate-with-xml-schema>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="a" uri="http://dummy/a"/>
   <s:ns prefix="b" uri="http://dummy/b"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="a:foo">The element root is not “a:foo”.</s:assert>
         <s:assert test="a:foo/b:bar">There is no child element b:bar.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

10 Jun 2021, Achim Berndzen

Added attribute 'queryBinding' to schematron's schema.

03 Jul 2020, Achim Berndzen

Added test