W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > December 2008

On usefulness of p:www-form-urlencode

From: <Toman_Vojtech@emc.com>
Date: Mon, 8 Dec 2008 03:22:00 -0500
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870DAFAEFA@CORPUSMX10A.corp.emc.com>
To: <public-xml-processing-model-comments@w3.org>

Hi all,

At its present form, p:www-form-urlencode step takes a set of parameters
from its parameter input port, URL encodes them (into a string in the
form "param1=value1&param2=value2&...") and then, similarly to
p:string-replace, replaces all matching nodes in the input document with
this string value.

I am wondering whether this is the best thing to do. In my opinion, in
most of the cases you want to inject full URLs (that is, something like:
"http://bla?param1=value2&...") in the document, not just encoded
parameters. As the spec stands now, you would need to use a sequence of
two p:string-replace like steps (p:www-form-urlencode +
p:string-replace):

- first, you encode and insert the parameters using
p:www-form-url-encode
- then you find the inserted values and prepend the server part using
p:string-replace

In my opinion, this is too inefficient and cumbersome (and possibly
unsafe in the second step as well).

Sorry that I bring up this issue again, but: what if
p:www-form-urlencode, p:uuid, p:hash just returned a simple c:result
document (containing the serialized parameters, or uuid, or hash)
instead of behaving as p:string-replace? In my opinion, this would give
us much more flexibility, because you could then do things like
assigning the content of c:result to a variable which you could then,
for instance, refer to in the "replacement" option in p:string-string
replace. It would also seem cleaner to me.

Regards,
Vojtech
Received on Monday, 8 December 2008 08:22:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 8 December 2008 08:22:58 GMT