Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Mixed content in data-binding (Was: Re: [xml-dev] Interestingpair of comments

From: Elliotte Harold <elharo@-------.---.--->
To: Pete Cordell <petexmldev@--------------.--->
Date: 7/15/2005 11:13:00 AM
Pete Cordell wrote:

> Being guilty of being a code-head (and a binding one at that - can it 
> get worse!), I'm keen to know how you'd like us to make a better fist of 
> it. One way of binding the example of "<p>This is <strong>very</strong> 
> important</p>" might be to have a class structure that (with any unused 
> elements ignored) looks like:-

Personally I'd stay away from data binding for use cases like this. 
Dealing with mixed content is hardly the only problem. You also have to 
deal with repeated elements, omitted elements, and order. Child elements 
just don't work well as fields. You can of course fix all this, but then 
you end up with something about as complicated as DOM.

Data binding is a plausible solution for going from objects and classes 
to XML documents and schemas; but it's a one-way ride. Going the other 
direction: from documents and schemas to objects and classes is much 
more complicated and generally not worth the hassle.

-- 
Elliotte Rusty Harold  elharo@m...
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent