[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
> Michael Kay wrote:
> 
> > 
> <email>fred@s...<last-modified>2005-02-02</last-modif
> ied></email>
> 
> I don't like this example. As I see it the natural interpretation of 
> this construct is that the e-mail address is 
> fred@s...2005-02-02. I don't think this is a good use of a 
> mixed content. 

I agree there's a convention with document-oriented XML that if you remove
all the tags, you are left with a human readable piece of text that makes
sense. But this convention is often breached, and we're basically free to
use the syntactic constructs of XML in any way we wish.

Here I'm supposing a recursive pair of relationships:

A property has zero-or-more annotations
An annotation is a property

And I'm also assuming that most properties have no annotations.

In this scenario I think that modelling it as above would be very reasonable
- if only I could describe the rules in a schema (which I can't).



>I would write this construct as:
>> 
>> <email>fred@s...</email>
>> <last-modified>2005-02-02</last-modified>

This doesn't meet the aim of allowing the structure to be recursive.

In my example the annotation appeared after the value of the property, and
applies to the value as a whole, but I wouldn't want to impose that
limitation. One could also have

<date-of-birth>1583<alternative-reading>1588</alternative-reading>-05-12</da
te-of-birth>

Part of the design aim is that an XML document with no annotations looks
exactly how it would have looked if annotations were not possible.

Michael Kay
http://www.saxonica.com/



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.