<?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>4765</bug_id>
          
          <creation_ts>2007-06-26 15:41:15 +0000</creation_ts>
          <short_desc>[XQX] normalization of &lt;xqx:attributeValue&gt; element in &lt;xqx:attributeConstructor&gt; different for equivalent documents</short_desc>
          <delta_ts>2007-08-30 09:15:10 +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>XQueryX 1.0</component>
          <version>Recommendation</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>INVALID</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="Oliver Hallam">oliver</reporter>
          <assigned_to name="Jim Melton">jim.melton</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>15616</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2007-06-26 15:41:15 +0000</bug_when>
    <thetext>According to the attribute-value normalization rules, the following elements give different attribute values:

&lt;xqx:attributeConstructor&gt;
  &lt;xqx:attributeName&gt;attr&lt;/xqx:attributeName&gt;
  &lt;xqx:attributeValue&gt;	&lt;/xqx:attributeValue&gt;
&lt;/xqx:attributeConstructor&gt;

&lt;xqx:attributeConstructor&gt;
  &lt;xqx:attributeName&gt;attr&lt;/xqx:attributeName&gt;
  &lt;xqx:attributeValue&gt;&amp;#x9;&lt;/xqx:attributeValue&gt;
&lt;/xqx:attributeConstructor&gt;

In the first case the tab (#x9) character in the value of the attribute is normalized to a space (#x20), whereas in the second case a tab character is inserted in the constructed attribute value.

However, these two xml fragments are identical by the rules of XML canonicalization, and so should have a single interpretation.

This is exhibited in the XQTS test cases Const-attr-ws-*.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15716</commentid>
    <comment_count>1</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2007-06-28 09:18:03 +0000</bug_when>
    <thetext>Just to clarify, the contents of the first &lt;xqx:attributeValue&gt; should be a single tab (#x9) character (this was converted to spaces by bugzilla).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16145</commentid>
    <comment_count>2</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2007-08-14 15:52:45 +0000</bug_when>
    <thetext>Thanks for your comment.  However, this difference was a deliberate decision by the Working Groups.  Accepting the argument (made in a previous bug report at http://www.w3.org/Bugs/Public/show_bug.cgi?id=3446) that a user might want to make the distinction, the WGs made the choice to differentiate. 

Consequently, I am marking this bug as resolved (INVALID) and ask that you mark it CLOSED at your earliest opportunity, </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16147</commentid>
    <comment_count>3</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2007-08-14 20:17:40 +0000</bug_when>
    <thetext>I&apos;d like to add a further explanation to Jim&apos;s response.

Both of the fragments that you&apos;ve provided will produce attr=&quot;&amp;#x9;&quot; when the XQueryX stylesheet is applied.

The XQueryX generated for some of the Const-attr-ws-* test cases was likely incorrect until I applied a fix a week or so ago.

Let&apos;s consider Constr-attr-ws-2:

(: Name: Constr-attr-ws-2 :)
(: Written by: Andreas Behm :)
(: Description: Attribute normalization tab :)

&lt;elem attr=&quot;	&quot;/&gt;


The XQueryX generate for this is now includes the following fragment:

          &lt;xqx:attributeConstructor&gt;
            &lt;xqx:attributeName&gt;attr&lt;/xqx:attributeName&gt;
            &lt;xqx:attributeValue&gt; &lt;/xqx:attributeValue&gt;
          &lt;/xqx:attributeConstructor&gt;

The tab in the XQuery has become a space in XQueryX, so that both will generate the same result.


Now consider Constr-attr-ws-5:

(: Name: Constr-attr-ws-5 :)
(: Written by: Andreas Behm :)
(: Description: Attribute normalization char ref &amp;#x9; :)

&lt;elem attr=&quot;&amp;#x9;&quot;/&gt;


The XQueryX generate for this is now includes the following fragment:

          &lt;xqx:attributeConstructor&gt;
            &lt;xqx:attributeName&gt;attr&lt;/xqx:attributeName&gt;
            &lt;xqx:attributeValue&gt;&amp;#x9;&lt;/xqx:attributeValue&gt;
          &lt;/xqx:attributeConstructor&gt;

Again, both the XQuery and XQueryX will produce the same result.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16331</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Hallam">oliver</who>
    <bug_when>2007-08-30 09:15:10 +0000</bug_when>
    <thetext>Thanks, that has made it clearer.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>