ab-validate-with-dtd-006

Test DTD validation: keys in the document properties take precedence over the serialization option on the step. The document is valid, so there should be no detection element in the xvrl report.

Test ab-validate-with-dtd-006.xml is expected to pass.

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

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-dtd serialization="map{'doctype-system' : 'i-do-not-exist'}">
      <p:with-input>
         <p:inline document-properties="map{'serialization' :                                                     map{'doctype-system' : '../documents/address.dtd'}                                                  }">
            <address>
               <first>Douglas</first>
               <last>Adams</last>
               <phone>42</phone>
            </address>
         </p:inline>
      </p:with-input>
   </p:validate-with-dtd>
   <p:identity>
      <p:with-input pipe="report"/>
   </p:identity>
</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 uri="http://www.xproc.org/ns/xvrl" prefix="xvrl"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="//xvrl:report">There is no xvrl:report element.</s:assert>
         <s:assert test="not(exists(//xvrl:report//xvrl:detection))">There should be no element 'xvrl:detection'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

14 Oct 2024, Norm Tovey-Walsh

Clarify test description.

15 Aug 2024, Achim Berndzen

Initial check in.