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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Mixed content in data-binding (Was: Re: [xml-dev] Interest

[ Lists Home | Date Index | Thread Index ]

> Michael Kay wrote:
> 
> > 
> <email>fred@somewhere.com<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@somewhere.com2005-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@somewhere.com</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/






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS