<?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>1234</bug_id>
          
          <creation_ts>2005-04-10 22:31:44 +0000</creation_ts>
          <short_desc>[DM] Typed Value and String Value of QName-valued parentless attributes</short_desc>
          <delta_ts>2016-05-18 18:48:40 +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>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://www.w3.org/Bugs/Public/show_bug.cgi?id=29651</see_also>
          <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="Norman Walsh">Norman.Walsh</assigned_to>
          <cc>BRANSTORM_69Q</cc>
          
          <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>3848</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-04-10 22:31:44 +0000</bug_when>
    <thetext>[DM] Typed Value and String Value of QName-valued parentless attributes

The Data Model states in 3.3.1.3:

An implementation may choose to store the string-value only and derive the
typed-value from it, or to store the typed-value only and derive the
string-value from it, or to store both the string-value and the typed-value.

There appears to be one case where the typed value of a node cannot be
constructed from the string value. This is the case of a parentless attribute
node whose type annotation is xs:QName or xs:NOTATION. A value-based
implementation can represent such an attribute node by virtue of the triples
proposal, but a string-based implementation cannot.

To retain the feasibility of string-value-only implementations, I propose adding
a new constraint to section 3.3.3 QNames and NOTATIONs:

&lt;quote&gt;
No qualified name that contains a prefix may be included in the typed value of
an attribute node that has no parent.
&lt;/quote&gt;

I believe that this constraint is already imposed by the XQuery language, which
does not allow any way of creating a parentless attribute node that has a
non-trivial type annotation. For XSLT, however, it prevents constructs of the form

&lt;xsl:variable name=&quot;x&quot; as=&quot;attribute()&quot;&gt;
  &lt;xsl:attribute name=&quot;a&quot; type=&quot;xs:QName&quot; 
                 select=&quot;&apos;a:value&apos;&quot; xmlns:a=&quot;some.uri&quot;/&gt;
&lt;/xsl:variable&gt;

XSLT will need a new error code indicating that this constraint is violated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3767</commentid>
    <comment_count>1</comment_count>
    <who name="Norman Walsh">Norman.Walsh</who>
    <bug_when>2005-04-19 15:24:17 +0000</bug_when>
    <thetext>Accepted at joint meeting 249</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3519</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2005-05-03 15:31:30 +0000</bug_when>
    <thetext>A new error condition has been added to XSLT 2.0 (draft Y): Error XTTE1545
occurs if you try to validate a parentless attribute node against a type derived
or constructed from xs:QName or xs:NOTATION.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126463</commentid>
    <comment_count>3</comment_count>
    <who name="PANCHO">BRANSTORM_69Q</who>
    <bug_when>2016-05-18 18:48:40 +0000</bug_when>
    <thetext>The Data Model states in 3.3.1.3:

An implementation may choose to store the string-value only and derive the
typed-value from it, or to store the typed-value only and derive the
string-value from it, or to store both the string-value and the typed-value.

There appears to be one case where the typed value of a node cannot be
constructed from the string value. This is the case of a parentless attribute
node whose type annotation is xs:QName or xs:NOTATION. A value-based
implementation can represent such an attribute node by virtue of the triples
proposal, but a string-based implementation cannot.

To retain the feasibility of string-value-only implementations, I propose adding
a new constraint to section 3.3.3 QNames and NOTATIONs:

&lt;quote&gt;
No qualified name that contains a prefix may be included in the typed value of
an attribute node that has no parent.
&lt;/quote&gt;

I believe that this constraint is already imposed by the XQuery language, which
does not allow any way of creating a parentless attribute node that has a
non-trivial type annotation. For XSLT, however, it prevents constructs of the form

&lt;xsl:variable name=&quot;x&quot; as=&quot;attribute()&quot;&gt;
  &lt;xsl:attribute name=&quot;a&quot; type=&quot;xs:QName&quot; 
                 select=&quot;&apos;a:value&apos;&quot; xmlns:a=&quot;some.uri&quot;/&gt;
&lt;/xsl:variable&gt;

XSLT will need a new error code indicating that this constraint is violated.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>