Lists Home |
Date Index |
> Michael Kay wrote:
> I don't like this example. As I see it the natural interpretation of
> this construct is that the e-mail address is
> email@example.com. 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:
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
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.