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

Re: bohemians, gentry

Re:  bohemians
On Thursday 05 December 2002 10:10, Robin Berjon wrote:
> Alaric B. Snell wrote:
> > I don't think so. Adding more restrictive typing doesn't change the data
> > in the documents, it just makes automated processing easier. Instead of
> > allowing a date field to contain "yesterday", "my birthday", "1/2/2002"
> > (note the ambiguity; 1st feb or 2nd jan) and so on you restrict it to a
> > specific date type written "YYYY-MM-DD", and the increased rigidity makes
> > it possible to write code that can be shown to handle all the cases.
> But...that's not at all stronger typing, it's stronger syntax.

That's a big part of what typing can be for XML. Rather than a wooly 
description that this element contains a date (the kind of typing that 
happens in so-called "untyped" XML), instead referencing a formally defined 

The argument about xs:decimal, xs:double, etc is a bit of a red herring - as 
any programmer knows, real and double are approximate binary floating point 
types. XSD's bad for forcing its users to know what programmers know; ASN.1 
has a much nicer model where the type REAL really means a real number and you 
have to explicitly add constraints on the precision to make it act like an 
IEEE real.

When the spec says that xs:decimal has 'arbitrary' precision it does not 
(well, from other use of the same term in other contexts, *should* not) mean:

1) That implementations can arbitrarily drop precision

2) That implementations have to allocate all available memory for the buffer

As any decent programmer will tell you, arbitrary precision types are so 
named because they give the *user* arbitrary precision, and if the machine 
doesn't have enough memory to represent what the user provides then it's the 
same problem as when a Java String type is told to handle a piece of text too 
large to fit into virtual memory, no more no less.

The XSD spec's wording may or may not be broken, however.

> > Yeah! ASCII, DNS, TCP/IP and all those other tightly defined binary
> > protocols just need to be rewritten every year, don't they?
> I think we'd have loved to get a chance to rewrite ASCII, only that proved
> difficult to do too early.

Hardly anybody has rewritten ASCII, but there are lots of extensions to it, 
only a few of which are really taking off :-)


A city is like a large, complex, rabbit
 - ARP


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.