Test choose-004.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:choose>
<p:wrap-sequence wrapper="result"/>
</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::result">The pipeline root is not result.</s:assert>
<s:assert test="count(self::result/*)=1">The result document should not have one child.</s:assert>
<s:assert test="self::result/doc">The child's name should be doc.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Added attribute 'queryBinding' to schematron's schema.
Changed test because a missing p:otherwise is now an implicit identity.
Changed test, because it not an error anymore, if no p:when is selected and no p:otherwise is present.
Fixed namespace
Fixed namespace
Port my test suite; add documentation and schemas