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 ]

Alaric B. Snell:

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

Robin Berjon:

> > But...that's not at all stronger typing, it's stronger syntax.

Alaric B. Snell:

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

There is no reason that the bludgeon of type needs to be used to enforce 
lexical constraints.  If lexical constraints are what you need, it's better to 
just use, well, lexical constraints.

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

No.  No red herring.  Jonathan insisted that "xs:decimal" is sauce for sleek 
wizards to do magic precision validation tasks, and we simply debunked that 

> 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

Umm.  It doesn't have to say this.  This is the simple reality.  If 
representing a particular decimal requires more resources than my machine has 
available, something has to give.

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

I didn't say they had to.  I was using a bit of reductio to hack at Jonathan's 
point that knowing in advance that they can be "arbitrary" is of any use.

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

Any decent reader will teach you how to follow an argument.  Try it next time.

Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Tour of 4Suite - http://www.xml.com/pub/a/2002/10/16/py-xml.html
Proper XML Output in Python - http://www.xml.com/pub/a/2002/11/13/py-xml.html
RSS for Python - http://www-106.ibm.com/developerworks/webservices/library/ws-p
Debug XSLT on the fly - http://www-106.ibm.com/developerworks/xml/library/x-deb


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

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