p:www-form-urldecode - decoding of parameter names and values

Hi all,

In the test www-form-urldecode-001.xml, we do the following:

<p:www-form-urldecode value="p3=three&amp;p2=two&amp;p1=one%26zero"/>

What is the correct result?

<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
   <c:param name="p3" value="three"/>
   <c:param name="p2" value="two"/>
   <c:param name="p1" value="one&amp;zero"/>
</c:param-set>

Or:

<c:param-set xmlns:c="http://www.w3.org/ns/xproc-step">
   <c:param name="p3" value="three"/>
   <c:param name="p2" value="two"/>
   <c:param name="p1" value="one%26zero"/>
</c:param-set>

When I introduced the "one%26zero" bit in the test, I expected it to
return "one&amp;zero" for p1. But later, Norm changed the expected
output to: "one%26zero".

Which is correct? In my opinion, '%26' should be decoded - otherwise, I
don't see the point of having p:www-urldecode at all. Also, there would
be no functionality in XProc to turn strings like %41%42%43 into proper
string values...

What do you think?

Regards,
Vojtech

Received on Tuesday, 10 February 2009 13:58:41 UTC