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

Re: An unclear point with W3C XML 1.0 Specification


Re:  An unclear point with W3C XML 1.0 Specification
david.lyon@c... wrote:

> In XML 1.0, we have a larger file with no type information
> and in the computergrid format, we have type information as
> well as a saving of around 35% or 2,680,000 bytes.
> 

It's smaller, though somehow I doubt that's important, but I'll leave 
that point be. However, it is simply not true that the custom format 
you've invented has even one bit more of type information than the XML 
format.

There is no rule anywhere that says that $ means an int or ? means a 
boolean or @ means a date. This is simply one interpretation of the 
plain text content, which you have written into your code. You could 
just as easily (probably more so) written knowledge into your code that 
sell_price and cost_price are ints, InStock is a boolean, and 
Arrival_Date is a date.

The XML document in both cases contains pretty much the same 
information, none of which has anything to do with data types. In both 
cases, the types are inferred by the code processing the XML document. A 
different process might usefully infer different types, for instance 
using a double type or a money type for the sell_price and cost_price. 
(In fact, maybe that's what you meant. I don't remember.) The types are 
in your code, not i the XML.

The real difference is that the more verbose format is much easier to 
process with XML aware tools like XPath, XQuery, XSLT, SAX, and XOM. 
Your custom format requires you to develop and maintain your own custom 
parser because you haven't used XML to markup the relevant structure.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

PURCHASE STYLUS STUDIO ONLINE TODAY!

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