[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: Remembering the original XML vision


xquery decimal places
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.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.