nw-ns-008
Tests for a non-XProc binding for p:.
h/t Amanda Galtman.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.1">
<p:input port="source">
<p:inline>1</p:inline>
</p:input>
<p:output port="result"/>
<p:try>
<p:error>
<p-alias:with-option xmlns:p-alias="http://www.w3.org/ns/xproc"
name="code"
select="'p:my-error-code'"/>
<p:with-input>
<error-document>An error occurred.</error-document>
</p:with-input>
</p:error>
<p:catch>
<p:identity/>
</p:catch>
</p:try>
</p:declare-step>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
queryBinding="xslt2">
<s:ns prefix="c"
uri="http://www.w3.org/ns/xproc-step"/>
<s:ns prefix="err" uri="my-ns"/>
<s:pattern>
<s:rule context="/">
<s:assert test="c:errors">Not an error document</s:assert>
<s:assert test="count(c:errors/c:error) = 1">Incorrect number of errors reported</s:assert>
</s:rule>
</s:pattern>
<s:pattern>
<s:rule context="c:error">
<s:assert test="namespace-uri-from-QName(resolve-QName(@code, .)) = 'http://my-ns'">Error code is in wrong namespace</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 25 Feb 2026, Norm Tovey-Walsh
- Initial commit