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 ]

From: "Jonathan Robie" <jonathan.robie@datadirect-technologies.com>

> My question was:
> 
> "Why does the presence of a data type prevent reuse, since you can always 
> throw it away? Can you show me an example where this causes problems?"
> 
> The data type provides additional information about the data. You can feel 
> free to discard this information if you don't need it, or to use it to 
> reinterpret the data, or to use the data as is. I am trying to think of a 
> concrete example where the presence of this data really gets in the way.

My perspective is slightly different than Jonathan's or Uche's nominal positions.

The concrete example is the one currently under discussion in various places: that in
XML Schemas datatypes you cannot represent any exact amounts that
have decimal positions.  So the decimal "1.1" is not the exact number 1.1.  
This will be well-known to most people who have done undergraduate 
computer science, and for a catch up, see Sun's BigDecimal documentation.

As soon as I fix the datatype xs:decimal to the type "1.1" I am fixing its
value and precision to something different than almost any "average"
user will be expecting.  And whether I can "throw away" that typing 
(i.e., adopt the natural typing that conforms to "average" user's expectation)
depends entirely on  the particular situation, it seems to me. (There is no need 
to adopt either extreme, unfortunately, that datatyping can always be thrown
away or that datatyping can never be thrown away.)

Jonathan's escape clause is to say "well, xs:decimal is not really the correct
datatype" but what else is there?  A restricted version of String will result
in these numbers being unusable as numbers in standard query languages.

Sorry to be a broken record, but WXS' pretence at being a universal schema
language (rather than adopting a modular, extensible design) and its adoption
by other technologies means that we have to judge it far more crtitically 
than less grand systems.

Cheers
Rick Jelliffe

P.S. For a possible alternative set of datatypes, you may be amused by
http://www.topologi.com/public/alternateDatatypes.html





 

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

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