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

Re: Objections to / uses of PSVI?


Re:  Objections to / uses of PSVI?
Ronald Bourret:

> It's really a trade-off between interoperability and functionality. The
> more specific your data types are, the better your uses of those data
> types will be. For example, if you're generating Java classes from your
> schema and you really want a certain property to be an int, you'll do
> better having an int data type than a genericAnySizeInteger data type,
> which you will have no choice but to map to a BigDecimal.

I think this is the crux of my disagreement with your position (which I understand to be that of much of the static-types-in-XML supporters).  Amy Lewis nailed it when she suggested that the proper way to think of data types is against the problem domain, not the implementation language.  Worrying about how to faithfully reproduce, say, an unsigned int type interoperably is very backward when it is very likely that the equivalent value in your real world problem *truly* follows a constraint of 0 to 2^32.

If your data binding says "number from 0 to 300000" (maybe the value in problem space is velocity in meters per second), then why would your Java program use a BigDecimal?  (It so happens in this case that WXS can, in a very rough and ugly way, give you the needed capability for expression, but it cannot in the general case.)

Of course, by just blithely declaring it "int", and even more blithely binding it to Java, you've just lost the most effective means of preventing someone from using a value of 300001, which is the sort of thing that makes space ships blow up (not int versus float distinctions).

In my view, the sort of blind data binding encouraged by WXS types is the terror of interoperability, not the boon.  Programmers tend to miss this because they generate the mapping using shiny GUIs, and imagine nothing could possibly be amiss.

Bottom line: if XML were given a smart, generic constraint mechanism, rather than one working group's guess at a useful type libraries, then not only would your problem of data binding be solved as well, but you would also gain much more "type safety" and interoperability.


> I think what this points out is a fundamental difference in how people
> think data types should be used with XML. Many people want complete
> control over their data, saying you will use an int (short, long, etc.)
> to represent this piece of data.

My amazement is that this would be considered complete control.  Hardly.  It is extremely weak control.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One (San Jose, Boston): http://www.xmlconference.com/
DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html
The Languages of the Semantic Web - http://www.newarchitectmag.com/documents/s=2453/new1020218556549/index.html
XML, The Model Driven Architecture, and RDF @ XML Europe - http://www.xmleurope.com/2002/kttrack.asp#themodel


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.