Options with xs:anyURI in XProc 3.2 002 (AB)

Tests rules for options with xs:anyURI in XProc 3.2

Test ab-option-uri-002.xml is expected to pass.

The pipeline

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:test="http://test" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.2">
   <p:output port="result"/>
   <p:declare-step type="test:test">
      <p:output port="result"/>
      <p:option name="uri" as="xs:anyURI" required="true"/>
      <p:identity>
         <p:with-input>
            <doc>{$uri}</doc>
         </p:with-input>
      </p:identity>
   </p:declare-step>
   <test:test xml:base="http://test">
      <p:with-option name="uri" select="'somewhere.txt'"/>
   </test:test>
</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="doc">The root element is not 'doc'.</s:assert>
         <s:assert test="doc/text()='http://test/somewhere.txt'">URI in option is not correctly resolved.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

17 Jun 2026, Achim Berndzen

New test for options with xs:anyURI.