[xslt] again on document() escaping: how many times? 2?



[ Please Cc: me answers because I'm not subscribed to this list ]

I'm here again for an issue related to document uri unescaping.

After latest Daniel's bugfix related to uri escaping, things like
"document('http://foo.bar/foo%20uri.xml')" are supposed to work
downloading file which name is 'foo uri.xml'.

Anyway I've noticed a strange behaviour:

        document argument             HTTP request       accessed file

1) http://foo.bar/foo%20uri.xml       foo%20uri.xml      foo uri.xml
2) http://foo.bar/foo%2520uri.xml     foo%20uri.xml      foo uri.xml
3) http://foo.bar/foo%252520uri.xml   foo%2520uri.xml    foo%20uri.xml
4) http://foo.bar/foo%25252520uri.xml foo%252520uri.xml  foo%2520uri.xml

Case (1) is the expected behaviour: document's argument is unescaped
while parsed and then escaped again before trying the HTTP request so
that accessed file is equal to the unescaping of document's argument.

Cases (2), (3), (4) show a different behaviour, document's argument
seems to be unescaped two times and the escaped back only once before
trying the HTTP request so that accessed file is equal to two unescaping
of document's argument.

To make document work has expected one then have to escape document's
argument two times wrt the desired resource.

IMHO this is a bug or at least a not so reasonable behaviour, isn't it?

Cheers.

-- 
Stefano Zacchiroli  -  undergraduate student of CS @ Uni. Bologna, Italy
   zack@cs.unibo.it | ICQ 33538863 | http://www.cs.unibo.it/~zacchiro
 "I know you believe you understood what you think I said, but I am not
 sure you realize that what you heard is not what I meant!" -- G.Romney



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]