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

Re: bohemians, gentry

zeros aren t important
Hash: SHA1

/ David Carlisle <davidc@n...> was heard to say:
| you might get away with it but if it's
| <Weight>0<!--I added this leading 0 for a reason-->123.4560</Weight>
| a query processor is allowed to report that as

Is allowed to, but doesn't have to. I hope, personally, to find and
use implementations of XPath2/XSLT and maybe even Query (if I ever
find a need for it) processors that keep the lexical forms around.

| <Weight>123.456</Weight>
| and information is lost.

Only if you applied a schema that said the data type of <Weight> was a
numeric. If you said it was a string, you'd get back just what you put

And if that leading zero is important, I think I can argue that it's
not "just a number" to you (leading zeros aren't important in
numbers), so you'd be asking for trouble to type it as such in your

And if you want, you can validate it as a string in your schema then
cast it to a number when you want to do something numeric with it. You
don't have to let the data model builder munge it for you.

                                        Be seeing you,

- -- 
Norman.Walsh@S...    | No man's knowledge here can go beyond his
XML Standards Architect | experience.--John Locke
Web Tech. and Standards |
Sun Microsystems, Inc.  | 
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>



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.
First Name
Last Name
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.