catalog-002

Make sure that the catalog configuration is available to parsers, etc.

Test is expected to pass.

Catalog

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         xmlns:t="http://xproc.org/ns/testsuite/3.0" prefer="public">
   <systemSuffix systemIdSuffix="sample.dtd"
                 uri="dtd/sample.dtd"/>
</catalog>

The pipeline

<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
                xmlns:p="http://www.w3.org/ns/xproc"
                xmlns:t="http://xproc.org/ns/testsuite/3.0" name="main" version="3.0">
   <p:output port="result" sequence="true"/>
   <p:xslt>
      <p:with-input port="source"
                    href="../documents/catalog-sample.xml"/>
      <p:with-input port="stylesheet"
                    href="../documents/identity.xsl"/>
   </p:xslt>
</p:declare-step>

Result

<sample xmlns:t="http://xproc.org/ns/testsuite/3.0">Hello, world.</sample>

Schematron checks

<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron"
          xmlns:t="http://xproc.org/ns/testsuite/3.0" queryBinding="xslt2">
   <s:pattern>
      <s:rule context="/">
         <s:assert test="sample">The root is wrong.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

17 May 2025, Norm Tovey-Walsh
Created test.