nw-psvi-001

Tests that p:validate-with-xml-schema produces PSVI annotations.

Test nw-psvi-001.xml is expected to pass.

It requires the following features: psvi-support.

The pipeline


<p:declare-step xmlns:ex="http://example.com/sample" xmlns:p="http://www.w3.org/ns/xproc" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0" psvi-required="true" exclude-inline-prefixes="#all">
   <p:output port="result" sequence="true"/>
   <p:load href="../documents/dated-sample.xml"/>
   <p:validate-with-xml-schema>
      <p:with-input port="schema">
         <p:document href="../documents/sample.xsd"/>
      </p:with-input>
   </p:validate-with-xml-schema>
   <p:identity>
      <p:with-input>
         <result>{/ex:doc/@pubdate/data() instance of xs:date}</result>
      </p:with-input>
   </p:identity>
</p:declare-step>

Schematron validation


<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="result">The root element is not result.</s:assert>
         <s:assert test="string(.) = 'true'">The result is not “true”.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

26 Dec 2024, Norm Tovey-Walsh

Proposed test.