[Bug 3161] [XPath] string value not always derivable from typed value

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

           Summary: [XPath]  string value not always derivable from typed
                    value
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: klaus.bosse@web.de
         QAContact: public-qt-comments@w3.org


In the situation of element-only content there exists a string-value
of the content but no typed-value. So I think xpath20, 2.5.2 should
be changed slightly to avoid misunderstanding:

original:

"An implementation may store both the typed value and the string
value of a node, or it may store only one of these and derive the
other from it as needed. The string value of a node must be a valid
lexical representation of the typed value of the node, but the node
is not required to preserve the string representation from the
original source document. For example, if the typed value of a node
is the xs:integer value 30, its string value might be "30" or
"0030"."

changed (changes in big letters):

"An implementation may store both the typed value and the string
value of a node, or it may store only one of these and derive the
other from it as needed. The string value of a node must be a valid
lexical representation of the typed value of the node, IF THIS
EXISTS, but the node is not required to preserve the string
representation from the original source document, SO THE STRING
VALUE MAY DIFFER SLIGHTLY. For example, if the typed value of a node
is the xs:integer value 30, its string value might be "30" or
"0030"."

The most important word in the second change is 'slightly'. This
means, that the string value retrieved in this way is not allowed to
be much different from a 'direct' constructed string value.

--------------------------------

Additional comment would be also helpfull on 3.3.1.3 Relationship
Between Typed-Value and String-Value:

"In order to permit these various implementation strategies, some
variations in the string value of a node are defined as
insignificant. Implementations that store only the typed value of a
node are permitted to return a string value that is different from
the original lexical form of the node content."


Klaus Bosse

Received on Thursday, 27 April 2006 16:45:17 UTC