OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Re: Remembering the original XML vision

[ Lists Home | Date Index | Thread Index ]

Hi Michael,

> At 2003-02-15 09:37, G. Ken Holman wrote:
>>Because XML 1.0 is easy for documents and the evolution of the W3C
>>specifications has not been respecting the ease of use for document
>>models or document use. For example, knowing a text construct
>>validly represents a number while still being able to access it as
>>the original string of text authored by the user.
> I'm not sure I follow you here. What specs prevent you from
> accessing the original string? XML Schema certainly doesn't: the
> input infoset is, by definition, unchanged by XML Schema processing.

In XQuery 1.0 and XPath 2.0, it's legal for an implementation to
reconstruct the string value of an attribute or element based on
canonical representation of the typed value of that node. The original
string value is lost in these cases. For example, in such a
"value-only" implementation, round-tripping:

  <foo xsi:type="xs:decimal">20.00</foo>

would produce:

  <foo xsi:type="xs:decimal">20.0</foo>

This is the case even when the lexical representation of a
user-defined data type is constrained using the pattern facet (for
example a monetary type that insists on two decimal places). Thus if
you use a value-only implementation to round-trip data of a data type
in which the legal set of lexical representations does not include the
canonical lexical representation for the primitive type from which
it's derived, you will get an invalid document out.

Whitespace normalisation also has an effect on the string values of
elements and attributes, of course, though rather less consequential.



Jeni Tennison


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS