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

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

           Summary: propose new function fn:escape-html-uri
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: ashok.malhotra@oracle.com
        ReportedBy: joannet@ca.ibm.com
         QAContact: public-qt-comments@w3.org


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]

--------------------------------------------------

Thanks,
Joanne

Received on Friday, 8 July 2005 13:56:18 UTC