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

Re: bohemians, gentry


sean gentry
At 11:35 PM 12/4/2002 +0000, Sean McGrath wrote:

>Besides, the more you tightly bind data types to chunks of your XML the more
>tightly you are binding XML to a process.

How does providing a datatype do that, if you still have access to the 
lexical representation?

>The whole point of XML is that is separates
>content from process so that your content can outlive your processes.

Hi Sean,

We both want to separate content from process, letting the content have its 
own meaning independently of the way it is processed. My gut says that 
providing type information helps meet this goal. Your gut seems to say the 
opposite.

You are saying that providing more information about data somehow binds XML 
to a process. I think that providing more data allows general purpose tools 
to process the data correctly without deep knowledge of the semantics of a 
given schema. For instance, consider the following:

         input()//value * 4

If the value is an integer, I would like to use integer arithmetic, which 
is precise and fast. If the value is an arbitrary precision decimal number, 
I have to use slower - but accurate - arbitrary precision arithmetic. If 
the value is a floating point number, then I have to use slower and 
approximate floating point arithmetic. If it is untyped data, then XQuery 
attempts to cast it to a double, which is what XPath 1.0 does for all data 
used in arithmetic operations.

So the presence of datatype information allows generic tools like XQuery to 
"do the right thing", without requiring you to "run the right program". It 
helps separate content from specific programs. I don't have to know that 
this particular value is supposed to be an arbitrary precision decimal and 
write code to handle it correctly.

Jonathan


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.