OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Request for a poll: (was RE: Datatypes vs anarchy)

In experimenting with some data-binding approaches, I've found my approach
drifting in a similar direction (if I understand, correctly, what you are

My current implementation is very rough and has significant shortcomings.
Basic structure of a data binding template, though, is:

		...declarative model of what the application wants...
		...rules for handling XML input and mapping to
		defined in the model...

Note that the model, in this case, describes the application-level data that
is the ultimate goal; it is not a schema for the inbound XML. The input
rules, in this implementation, also serve as a lightweight schema for the
XML. I know this is different from what you had in mind, but I think I see

Within the rules, I allow embedding of Java code to process elements that
match the rule (rather than trying to provide an XML syntax that can handle
all necessary cases). This binding file is run through a processor that
generates a Java class implemented as a state machine that responds to SAX

Some things worked well with this approach; some things didn't. One thing
I've definitely moved away from, though, is the notion of a binding whose
outputs are dictated by the structure of the XML, or which can be specified
completely using a grammar-based schema. I don't try to do a simple, direct
mapping between elements and objects. The idea of the binding is to take
some defined XML structure, and some defined structure for the sort of
data/objects the application wants to deal with (which may be totally
unrelated to the XML structure), and specify a way to populate the target
objects/data structures with information extracted from the XML document.

> -----Original Message-----
> From: Rick Jelliffe [mailto:ricko@allette.com.au]
> Sent: Wednesday, March 14, 2001 9:57 PM
> To: Ronald Bourret; xml-dev
> Subject: Re: Request for a poll: (was RE: Datatypes vs anarchy)
> From: Ronald Bourret <rpbourret@rpbourret.com>
> > By the way, XML schemas seem to be most useful for defining XML
> > structures -- the mappings that I could figure out to object and
> > database schemas get pretty shaky in places. I'm still not 
> sure if this
> > is due to the schema language itself or the inherent 
> mismatches between
> > XML, objects, and databases. Certainly the problem is not 
> as easy as it
> > looks.
> Yes. And there is a nice design issue here for the future too:
> Perhaps what we need for a schema language is something along 
> the lines of
>   <schema>
>      <conceptual-model>
>     ...
>      </conceptual-model>
>      <language-binding>
>     ...
>      </language-binding>
>   </schema>
> In XML Schemas, we have found all sorts of nice abstractions 
> (components)
> for what goes on in a language.  Yet the conceptual modeling 
> people (I think
> Robin Cover and Peter Chen might concur) think that the 
> bottom-up approach
> is odorous.
> That is why, to jump on my hobbey-horse, I don't see that we need more
> grammar-based schema languages (not to say that we shouldn't 
> continue to
> perfect and mate existing ones).  Instead, we need to start 
> thinking about
> what schema languages would be needed to implement the above 
> kind of schema.
> Personally, I think that a schema language made from ER for 
> the conceptual
> model and a Schematron-like language to do the language 
> binding might be a
> nice fit (if Schematron-like languages can be extended to act 
> generatively.)
> Cheers
> Rick Jelliffe