<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2462</bug_id>
          
          <creation_ts>2005-11-04 16:54:35 +0000</creation_ts>
          <short_desc>[XQuery] Escaping URILiterals</short_desc>
          <delta_ts>2006-01-04 18:57:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Don Chamberlin">chamberl</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7046</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-11-04 16:54:35 +0000</bug_when>
    <thetext>Section 2.4.5, URILiterals, says:

&quot;...however, no escaping normalization is applied.&quot;

It&apos;s not obvious to me what &quot;escaping normalization&quot; is but I suspect it&apos;s
something to do with representing special characters as %HH (an operation we
are now required to call encoding rather than escaping, for reasons that,
er, elude me).

I think that the above phrase has nothing to do with ampersand-escaping.
Specifically, I think that an ampersand in a URILiteral must be written as
&amp;amp; just as an ampersand in a string literal is written. 

It might be useful (after CR, I guess) to add some clarification here.

Michael Kay

previously raised at 
http://lists.w3.org/Archives/Member/w3c-xml-query-wg/2005Oct/0006.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7594</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-04 10:39:04 +0000</bug_when>
    <thetext>Here&apos;s a concrete proposal to resolve the problem: replace the sentence (in 2.4.5)

The value of a URILiteral is whitespace-normalized according to the rules for
the xs:anyURI type in [XML Schema]; however, no escaping normalization is applied.

by

As in a string literal, any PredefinedEntityRef (for example, &amp;amp;), CharRef
(for example, &amp;#x2022;) or EscapeQuot or EscapeApos (for example, &quot;&quot;) is
replaced by its appropriate expansion. Certain characters, notably the
ampersand, can only be represented using a PredefinedEntityRef or CharRef. 

The URILiteral is subjected to whitespace normalization as defined for the
xs:anyURI type in [XML Schema]: this means that leading and trailing whitespace
is removed, and any other sequence of whitespace characters is replaced by a
single space (#x20) character. Whitespace normalization is done after the
expansion of CharRefs, so writing a newline (say) as &amp;#xA; does not prevent its
being normalized to a space character.

The URILiteral is not automatically subjected to percent-encoding or decoding as
defined in [RFC3986]. Any process that attempts to resolve the URI against a
base URI, or to dereference the URI, may however apply percent-encoding or
decoding as defined in the relevant RFCs.

Michael Kay</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7607</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-01-04 18:57:31 +0000</bug_when>
    <thetext>The WG accepted this proposal.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>