[tei-council] Wot is wrong with my ODD?

Martin Holmes mholmes at uvic.ca
Fri Jun 6 20:17:11 EDT 2014


Hi Lou,

On 14-06-06 02:48 PM, Lou Burnard wrote:
> 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>

That's what I actually started with, so we're both on the same page 
regarding how we expect things to work.

> 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've been using the Oxygen ant task to generate the schema, but if 
Sebastian's fixed a bug recently then I should probably try again with 
the latest Stylesheets. I'll do that and report back.

Cheers,
Martin

> 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