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

Re: W3C Schema: Resistance is Futile, says Don Box


Re:  W3C Schema: Resistance is Futile
> How does typing something as Notation, as NCName, as gMicrosecondEon, or
> as unsignedLong help me to unpack an XML instance into Java native
> storage without knowledge of semantics?

You're focusing on the wrong kind of types. SOAP toolkits can usually
generate language-specific bindings that make it really easy to read and
write XML. Element declarations bound to complex types become classes.
Locally scoped elements (and attributes) bound to simple types become the
member variables of those classes. The form in which those language-specific
bindings take isn't important and they'll obviously be different for each
language. What's important is that the mapping is automatic and that valid
instances of the types can be parsed and emitted without requiring precious
development time being spent on such low-level details.

A Java-specific binding for an unsignedLong derivative could use BigInteger.
The setter for that field could enforce whatever restrictions were placed on
the simple type in the schema. What's really important to the developer
using this toolkit is that the conversion from XML to the native constructs
supported by his language and back again happen automatically. He didn't
have to type in a single pointy bracket. SAX and the DOM or whatever the
generated code used to parse the XML is completely hidden from him as well.

XSDL is hardly the best language for just validation. DTDs are fine for
that. RELAX NG is even better. Use the right tool for the right job.

Jason




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.