W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2005

[Bug 1234] New: [DM] Typed Value and String Value of QName-valued parentless attributes

From: <bugzilla@wiggum.w3.org>
Date: Sun, 10 Apr 2005 22:31:44 +0000
To: public-qt-comments@w3.org
Cc:
Message-Id: <E1DKky0-000551-SG@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=1234

           Summary: [DM] Typed Value and String Value of QName-valued
                    parentless attributes
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model
        AssignedTo: ndw@nwalsh.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


[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:

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

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

<xsl:variable name="x" as="attribute()">
  <xsl:attribute name="a" type="xs:QName" 
                 select="'a:value'" xmlns:a="some.uri"/>
</xsl:variable>

XSLT will need a new error code indicating that this constraint is violated.
Received on Sunday, 10 April 2005 22:31:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:37 GMT