[tei-council] Wot is wrong with my ODD?
Lou Burnard
lou.burnard at retired.ox.ac.uk
Fri Jun 6 17:48:49 EDT 2014
On 06/06/14 22:18, Martin Holmes wrote:
> I'm trying to create a content model for <seg> using the new TEI ODD
> elements. I want to allow any of a small number of elements, with text
> mixed in, or just text. I have this:
>
> <elementSpec ident="seg" mode="change">
> <content>
> <alternate allowText="true">
> <macroRef key="data.text"/>
> <sequence allowText="true" preserveOrder="false" minOccurs="0">
> <elementRef key="orgName" maxOccurs="unbounded" minOccurs="0"/>
> <elementRef key="persName" maxOccurs="unbounded" minOccurs="0"/>
> <elementRef key="choice" maxOccurs="unbounded" minOccurs="0"/>
> <elementRef key="seg" maxOccurs="unbounded" minOccurs="0"/>
> <elementRef key="trait" maxOccurs="unbounded" minOccurs="0"/>
> </sequence>
> </alternate>
> </content>
> </elementSpec>
I would represent what I think you want (but I may be completely
misunderstanding it...) much more simply :
<elementSpec ident="seg" mode="change">
<content>
<sequence allowText="true" preserveOrder="false">
<elementRef key="orgName" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="persName" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="choice" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="seg" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="trait" maxOccurs="unbounded" minOccurs="0"/>
</sequence>
</content>
</elementSpec>
However, that doesn't seem to work as it should. There was a bug in the
stylesheets in the handling of @allowText which I thought Sebastian had
fixed. But maybe he hasn't allowed for this attribute to appear on
<sequence>.
I don't think the macroRef does what you want -- it inserts a reference
to data.text, not text.
More information about the tei-council
mailing list