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

RE: Mixed content in data-binding (Was: Re: Interest


RE:  Mixed content in data-binding (Was: Re:  Interest
nly interested in.
> 
> 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:-
> 
>     class p
>     {
>         string cdata1;        // = "This is "
>         class strong strong;
>         string cdata2;        // = " important"
>     };

That seems to handle the specific example and not the class of all possible
instances (which hasn't been defined here).

If I was modelling this data in Java I would use a List of Objects each of
which is either a String or a StrongElement or an EmphElement or one of the
various other things that's allowed to appear. Alternatively I might use a
TextNode rather than a String, if I want to hold information other than its
content.

Of course Java (even Java 5) wouldn't give me any strong typing on that.

Michael Kay



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.