nw-validate-with-rng-002

Tests the dtd-default-attributes option.

Test nw-validate-with-rng-002.xml is expected to pass.

It requires the following features: p-validate-with-relax-ng.

The pipeline


<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
   <p:output port="result"/>
   <p:validate-with-relax-ng dtd-attribute-values="false">
      <p:with-input port="source" href="../documents/rng-def-attr.xml"/>
      <p:with-input port="schema" href="../documents/rng-def-attr.rnc"/>
   </p:validate-with-relax-ng>
</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:pattern>
      <s:rule context="/">
         <s:assert test="document">The pipeline root is not “document”.</s:assert>
      </s:rule>
      <s:rule context="document">
         <s:assert test="not(@status)">There’s a “status” attribute.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

06 Dec 2025, Norm Tovey-Walsh

Initial version