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] bohemians, gentry

[ Lists Home | Date Index | Thread Index ]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

/ David Carlisle <davidc@nag.co.uk> 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
in.

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
schema.

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,
                                          norm

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

iD8DBQE972NmOyltUcwYWjsRAnxTAJ9N8y+0CPJBKGszAAyRgevMTS9gAwCgiAjO
/bRTvMLYSDmgxonVX+y3Np0=
=5/W5
-----END PGP SIGNATURE-----




 

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

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