<?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>8206</bug_id>
          
          <creation_ts>2009-11-05 21:20:37 +0000</creation_ts>
          <short_desc>[Ser] Serialization requires no escaping of &lt; in URI attribute with XHTML</short_desc>
          <delta_ts>2010-06-29 13:53:39 +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>Serialization 1.0</component>
          <version>Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#serphases</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>trivial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Zongaro">zongaro</reporter>
          <assigned_to name="Henry Zongaro">zongaro</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>29360</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2009-11-05 21:20:37 +0000</bug_when>
    <thetext>A colleague pointed out this problem in the &quot;Character Expansion&quot; step of the phases of serialization.[1]  Suppose the output method is XHTML and the escape-uri-attributes serialization parameter has the value &quot;yes&quot;.  For any URI attribute, step 3a. requires URI escaping to be applied and that steps 3b. through 3e. be skipped.

The URI escaping is described in three steps:  i) Unicode normalization; ii) percent encoding as described for fn:escape-html-uri; and iii) escaping &quot;according to HTML rules any characters (such as &lt; and &amp;) where HTML requires escaping.  For example, replace &lt; with &amp;lt;.&quot;

For other attributes, step 3e. would cause a less than to be replaced with &amp;lt; or an equivalent character reference.

It&apos;s not clear which HTML rules apply here - those of the various HTML recommendations, those of the HTML output method or both.  If this was a reference to the rules of the HTML output method, alone or together with the requirements of the relevant HTML recommendation, it must be noted that section 7.2 of serialization actually prohibits a less than character from being escaped.[2]  It states, &quot;The HTML output method MUST NOT escape &quot;&lt;&quot; characters occurring in attribute values.&quot;

[1] http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#serphases
[2] http://www.w3.org/TR/2007/REC-xslt-xquery-serialization-20070123/#HTML_ATTRIBS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29526</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2009-11-12 16:58:12 +0000</bug_when>
    <thetext>I&apos;ve reduced the priority/severity to mark this as an editorial issue.  I don&apos;t believe there&apos;s any doubt about the intent - that the XHTML output method should be able to escape less than characters that appear in any attribute value.

I propose the following change:

. In Section 4, bullet 3.a.iii, change &quot;escape according to HTML rules&quot; to &quot;escape according to XML or HTML rules, as determined by the applicable output method, &quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29759</commentid>
    <comment_count>2</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2009-11-26 20:54:33 +0000</bug_when>
    <thetext>At its call of 2009-11-12,[3] the XSL WG observed that the response proposed in comment #1 did not address the question of whether &quot;HTML rules&quot; referred to the rules of the HTML output method or the rules of one of the HTML Recommendations.  The consensus was that this referred to the rules of the output method.  The following changes were proposed and accepted during the call:

. In Section 4, bullet 3.a.iii, change &quot;escape according to HTML rules any characters (such as &lt; and &amp;) where HTML requires escaping&quot; to
&quot;escape according to the rules of the XML or HTML output method, whichever is applicable, any characters that require escaping&quot;

. In Section 4, bullet 3.e, change &quot;escape according to XML or HTML rules&quot; to
&quot;escape according to the rules of the XML or HTML output method, whichever is applicable,&quot;


Ratification of this decision by the XQuery Working Group is pending.

[3] http://lists.w3.org/Archives/Member/w3c-xsl-wg/2009Nov/0028.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35952</commentid>
    <comment_count>3</comment_count>
    <who name="Henry Zongaro">zongaro</who>
    <bug_when>2010-06-03 21:22:28 +0000</bug_when>
    <thetext>As this bug is editorial, I will go ahead and make this Serialization erratum SE.E18, with the edits as described in comment #2.  I will apply the changes in the next revision of the Serialization 1.0 errata document as well as to the working draft of Serialization 1.1.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>