[tei-council] <content> vs <mixedContent>

Lou Burnard lou.burnard at retired.ox.ac.uk
Fri Oct 3 11:55:00 EDT 2014


On 03/10/14 16:47, Martin Holmes wrote:
> I agree, on the assumption that there's nothing intrinsically 
> different between a content model which has some structure but allows 
> <p> anywhere in it, and a model with some structure which allows a 
> text node anywhere in it. 

There is a major difference: I don't know of any schema language that 
allows you to say "allow <p> anywhere" now that XML got rid of inclusion 
exceptions

> Are we sure we need to make a distinction at all? In one sense, 
> there's no reason to treat a text node any differently from an element 
> node: mention it when it can appear, and that's the end of it. 

The reason for treating it differently is that a serialization can have 
a zero length textnode, which is not quite the same as an empty element.

> On the other hand, it's a bit special in that all sequences of text 
> nodes collapse to a single node;

eh? I dont think a content model can have a sequence containing just 
<textNode>s. That would be nonsense.

> I can imagine content models (especially those relying on pre-defined 
> models) which end up allowing sequences of multiple text nodes; would 
> an ODD processor have to be aware of that? 

An ODD processor already has to resolve sequences of identical elements 
resulting from adapation of pre-defined models (we saw one just the 
other day on tei-l) so I think this is a known problem

a


More information about the tei-council mailing list