xsl-list
[Top] [All Lists]

Re: [xsl] Decoding %-escaped chars in URI

2009-11-20 12:42:30
Michael Kay wrote:

No there's no such function.

  That's sad, but at least I'm reassured about my spec searching
skills ;-)

As a matter of interest, what's the use case?

  I am writing a WebDAV client in XSLT, using the EXPath HTTP
client.  In the result, the paths are encoded (for instance if you
ask the list of resources in a collection, aka the files in a
directory).  See (in particular the example in 8.3.1):

    http://tools.ietf.org/html/rfc4918#section-8.3

  So to display the resource name to a human, I should decode it
first.

(b) difficulty in the detail of specifying it: what do you do
for example with percent signs that aren't followed by two hex
digits.

  Yes.  I've just written such a function in plain XSLT, and I
generate an error in that case.  If I am right (but I did not
check) the input is not a valid lexical URI if this is the case
(for instance "http://.../a%2";).

  Regards,

-- 
Florent Georges
http://www.fgeorges.org/
























--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>