Tests p:www-form-urldecode
Test ab-www-form-urldecode-003.xml is expected to pass.
<p:declare-step xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0" exclude-inline-prefixes="map">
<p:output port="result"/>
<p:www-form-urldecode>
<p:with-option name="value" select="'key=value1&key=value2'"/>
</p:www-form-urldecode>
<p:identity>
<p:with-input>
<result>
<keys>{map:keys(.)}</keys>
<count>{count(.?key)}</count>
<first>{.?key[1]}</first>
<second>{.?key[2]}</second>
</result>
</p:with-input>
</p:identity>
</p:declare-step>
<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="result/keys/text()='key'">The content of 'keys' is not 'key'.</s:assert>
<s:assert test="result/count/text()='2'">The content of 'count' is not '2'.</s:assert>
<s:assert test="result/first/text()='value1'">The content of 'first' is not 'value1'.</s:assert>
<s:assert test="result/second/text()='value2'">The content of 'second' is not 'value2'.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
New test added.