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

Syd Bauman syd at paramedic.wwp.northeastern.edu
Mon Oct 6 09:12:11 EDT 2014


In haste ...

SR> define the "text node" in <mixedContent> to mean 'rng:data
SR> tyoe="string"'
SB> yes. Unless we mean 'rng:text' of course.
SR> hand up anyone who knows the difference

We mean rng:text.


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.)

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


More information about the tei-council mailing list