ab-validate-with-dtd-013

Test DTD validation: Detection element needs to be in report for non existing DTD.

Test ab-validate-with-dtd-013.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-no-exist.dtd'}" assert-valid="false">
      <p:with-input>
         <p:inline>
            <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="exists(//xvrl:report//xvrl:detection)">There should be a element 'xvrl:detection'.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

15 Aug 2024, Achim Berndzen

Initial check in.