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

RE: Stupid Question (was RE: XML doesn't dese rve it

dese sax com
> I have no idea of what the handler classes would look like, 
> but my first try
> at it would be a kind of application-specific DOM. The type 
> mapping would
> build this application-specific DOM from a stream of SAX 
> events or from a
> W3C DOM instance (since I think PSVI cannot be obtained in a 
> first-pass
> parsing with SAX, the full document must be parsed first to 
> allow the PSV to
> resolve some lookaheads).
That's actualy an approach that's being tried here, although straight off of
the schema instead of the PSVI. You're going to take some performance hit
working off of a generic data model such as a DOM, but it beats working with
the DOM directly. 

One thing you're going to need is some higher-level classes, because any
methods you generate off of a PSVI or Schema are going to be (by nature)
fine-grained. People are going to want a Point() class, for instance, that
takes x, y, and unit values, not set each individually. 

That calls for a layering approach. The method I'm advocating is to bypass
DOM and head straight to generating objects from XML Schema (XML data
binding), and then add a proxy layer over the top that the application works
with. This insulates the app from having to immediately react to minor
tweaks to the data model, which is important during development (as you
don't want to bother the GUI guys too often [they're artistes, you know]). 

Now, this doesn't solve the new elements/attributes problem your approach
does, but perhaps a hybrid approach could be where you use 'direct' object
mapping via a code generation binding too, and a generic data model API for
the new stuff. Not quite as sophisticated, but functional.


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