[Bug 1524] propose new function fn:escape-html-uri

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1524





------- Additional Comments From fsasaki@w3.org  2005-07-22 04:54 -------
(In reply to comment #0)
> This function would perform URI escaping as currently defined by the 
> Serialization specification.  If this function is adopted, then the 
> Serialization specification would reference this function definition when 
> describing URI-escaping in the character expansion phase.  
> 
> 
> --------------------------------------------------
> 
> fn:escape-html-uri($uri as xs:string?) as xs:string 
> 
> This function escapes all characters except printable characters of the US-
> ASCII coded character set, specifically octet ranging from 32 to 126 
> (decimal).  The effect of the function is to escape a URI according to how html 
> user agents would handle attribute values that expect URIs.  Each character in 
> $uri to be escaped is replaced by an escape sequence, which is formed by 
> encoding the character as a sequence of octets in UTF-8, and then representing 
> each of these octets in the form %HH, where HH is the hexadecimal 
> representation of the octet.  This function must always generate hexadecimal 
> values using the upper-case letters A-F.
> 
> If $uri is the empty sequence, returns the zero-length string.
> 
> Note:
> 
> 	The behavior of this function corresponds to the recommended handling 
> of non-ASCII characters in URI attribute values as described in Appendix B.2.1
> [HTML 4.0]

In the serialization specification, you refer to XLink 1.0. In this
specification, you say that URI escaping is defined in terms of the
serialization specification, but you also define it in terms of HTML 4.0. I'm a
little bit confused by this. Could you clarify?
In a previous comment, we pointed out that XLink 1.1 defines escaping in terms
of IRI. Could you imagine to refer to IRI, section 3.1, for the URI escaping?
Thank you for your reply in advance. 

-- Regards, Felix Sasaki.

> 
> --------------------------------------------------
> 
> Thanks,
> Joanne

Received on Friday, 22 July 2005 04:54:49 UTC