Re: FW: Escaping the # mark

On Wed, 2005-12-07 at 11:00 -0800, Ashok Malhotra wrote:
> > The current definitions are in sections 7.4.10 and 7.4.11 in 
> > http://www.w3.org/TR/xpath-functions/
[...]
> > 
> > Currently encode-for-uri() does NOT escape a "#" sign.
> > 
> > This seems contrary to the purpose of the function,

to wit: "This function should be used to process an xs:string to be used
as a path segment in a URI."

yes, encode-for-uri("the #1 soft-drink") should
be
  'the%20%231%20soft-drink'

I just did a quick test with python:

>>> urllib.quote("the #1 soft-drink")
'the%20%231%20soft-drink'

[...]
> > 
> > Note: I was alerted to the oddity of the current spec by the 
> > test results for fn-encode-for-uri1args-1 and related tests. 
> > The Saxon implementation currently does escape "#".

Ah. good to see these details showing up in testing.

> > Having looked at this, we should then look at the 
> > iri-to-uri() list as well.
[... I skipped this stuff; it doesn't seem to be relevant,
given the subject line.]


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Thursday, 8 December 2005 15:07:37 UTC