Test choose-001.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="main" version="3.0">
<p:option name="match"/>
<p:output port="result"/>
<p:identity name="id">
<p:with-input port="source">
<p:inline document-properties="map { 'a': '1', 'b': '2' }">
<doc/>
</p:inline>
</p:with-input>
</p:identity>
<p:choose name="choose">
<p:when test="p:document-property(., 'a') = $match">
<p:identity>
<p:with-input port="source">
<p:inline>
<doc>one</doc>
</p:inline>
</p:with-input>
</p:identity>
</p:when>
<p:when test="p:document-property(., 'b') = $match">
<p:identity>
<p:with-input port="source">
<p:inline>
<doc>two</doc>
</p:inline>
</p:with-input>
</p:identity>
</p:when>
<p:otherwise>
<p:identity>
<p:with-input port="source">
<p:inline>
<doc>none</doc>
</p:inline>
</p:with-input>
</p:identity>
</p:otherwise>
</p:choose>
</p:declare-step>
<s:schema xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns prefix="c" uri="http://www.w3.org/ns/xproc-step"/>
<s:pattern>
<s:rule context="/*">
<s:assert test="self::doc">The pipeline root is not doc.</s:assert>
<s:assert test=". = 'one'">The result isn't "one"</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Port my test suite; add documentation and schemas