<?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>3527</bug_id>
          
          <creation_ts>2006-07-24 13:54:25 +0000</creation_ts>
          <short_desc>3.7.1.1 Attributes: xml:id processing misleading</short_desc>
          <delta_ts>2006-09-19 23:06:09 +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>Data Model 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</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="Frans Englich">frans.englich</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>10714</commentid>
    <comment_count>0</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-07-24 13:54:25 +0000</bug_when>
    <thetext>The fifth step in 3.7.1.1 Attributes reads:

&lt;quote&gt;
If the attribute name is xml:id, the string value and typed value of the attribute are further normalized by discarding any leading and trailing space (#x20) characters, and by replacing sequences of space (#x20) characters by a single space (#x20) character.
Note:
This step accomplishes xml:id processing as defined in [XML ID].
&lt;/quote&gt;

However, section 4 Processing xml:id Attributes in [XML ID] reads(among other things):

&lt;quote&gt;
An xml:id processor must assure that the following constraints hold for all xml:id attributes:
The normalized value of the attribute is an NCName according to the Namespaces in XML Recommendation which has the same version as the document in which this attribute occurs (NCName for XML 1.0, or NCName for XML 1.1).
&lt;/quote&gt;

This validation-part of xml:id processing is not mentioned in 3.7.1.1 Attributes. That is, I find it unclear what an implementation is supposed to do on for example &lt;elem xml:id=&quot;1.ThisIsNotAnNCName&quot;/&gt;

I can imagine several different ways: 1) issue an error; 2) the attribute is ignored as if it wasn&apos;t set and/or is-id is not set; 3) set is-id to true and keep the invalid value.

Perhaps related: this topic is also touched in F&amp;O. 15.5.2 fn:id and 15.5.3 fn:idref reads:

&quot;If any of the tokens is not a lexically valid IDREF (that is, if it is not lexically an xs:NCName), it is ignored.&quot;


Frans</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11642</commentid>
    <comment_count>1</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-13 10:58:48 +0000</bug_when>
    <thetext>It looks like xml:space attributes will be validated, and therefore one can think that it is also sensible to validate xml:id(consistency, user expectations).

ACTION A-305-10(Jonathan Robie) is assigned to this report.

xml:space bug:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3636</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11759</commentid>
    <comment_count>2</comment_count>
    <who name="David Marston">david_marston</who>
    <bug_when>2006-09-14 21:04:35 +0000</bug_when>
    <thetext>I believe that XSLT 2.0 has a similar issue. I can construct an element (for the final result tree OR a temporary tree) and give it an attribute named xml:id and parts 11.1.2 and 11.3 of the CR of XSLT 2.0 say that the is-id property would be set true. They do not have an error code for the value of said attribute not meeting the constraints. Can we ensure that the resolution is coordinated between XSLT and XQuery?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11853</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2006-09-19 14:20:15 +0000</bug_when>
    <thetext>At the last face-to-face, we decided to close Bug #3527 as follows:

In the XQuery/XPath documents 3.7.1.1 and 3.7.3.2, we will add add &quot;If an error occurs during xml:id processing, an implementation may, but is not required to, raise an error XQVYxxxxxxxx&quot;.  

In the data model, under is-id, when we way &quot;xml:id processing is performed&quot;, we will insert the same language as above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11879</commentid>
    <comment_count>4</comment_count>
    <who name="Frans Englich">frans.englich</who>
    <bug_when>2006-09-19 23:06:09 +0000</bug_when>
    <thetext>Seems fine. Consistent with the recent xml:space changes.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>