|
[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
> 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








