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

Martin Holmes mholmes at uvic.ca
Mon Oct 6 11:08:07 EDT 2014


On 14-10-06 06:12 AM, Syd Bauman wrote:
> MH> I'm still not really clear on why we need <mixedContent> if we
> MH> have <textNode>. Isn't it rather a complication? Isn't
> MH> <mixedContent> just shorthand for a content model where text nodes
> MH> are freely interleaved with other elements?
>
> Well, yes, presuming you mean "interleaved" in a vernacular sense, not
> the precise RELAX NG sense. But it's shorthand for the specific
> content model that XML 1.0 requires for mixed content:[1]
>      ( #PCDATA | duck | quack )*
> You can't e.g., have any of the following in an XML DTD:
>      ( #PCDATA, duck, quack )*
>      ( #PCDATA | duck | quack )+
>      ( #PCDATA | duck | quack )
>      ( duck | #PCDATA | quack )*
>      ( duck, #PCDATA, quack )
> each of which you could express in other schema languages (although
> the 4th one down selects exactly the same set of constructs).
>
> So I think it is quite useful for schema-builders who want
> flexibility in schema language output. (Although, as always, I
> wouldn't mind dropping support for DTDs entirely. But now that we
> have TEI Tite and, and Apex uses DTDs, there's a political hurdle,
> as well as technical and social hurdles.)

I would be really depressed if we ended up with an over-complicated and 
messy specification for Pure ODD because we want to maintain backward 
compatibility with DTDs. I think the issue of generating DTDs, if it's 
important to maintain it, is something that should be down to an 
implementation of an ODD processor, and any compromises made (in terms 
of simplifying content models in ways that make them more or less 
restrictive than they would be in other schema languages) can be 
reported to the user when the DTD is generated, along with a 
recommendation that they move to a more modern schema language.

I see no reason why Tite shouldn't continue to be maintained in such a 
way that it can be used to generate good DTDs, assuming Apex is 
unwilling to move. We presumably *can* write a Pure ODD file which 
avoids features unsupported in DTD, such that docuements validating it 
will also validate against tei_all.

Cheers,
Martin

> Note
> ----
> []1 http://www.w3.org/TR/REC-xml/#sec-mixed-content
>


More information about the tei-council mailing list