[tei-council] Wot is wrong with my ODD?
Martin Holmes
mholmes at uvic.ca
Sat Jun 7 17:33:29 EDT 2014
Hi Sebastian,
On 14-06-07 09:50 AM, Sebastian Rahtz wrote:
>
> On 6 Jun 2014, at 23:18, Martin Holmes <mholmes at uvic.ca> 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 am not convinced that what you want is legal in XML
I must have explained it wrong. It's a mixed-content element with any of
a set of subelements and/or text in between them. Surely that's what
tei:p is?
>
>> 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>
>>
>
> you can’t have a content model in which the elements occur in a fixed order, with optional spaces
> between. not as I understand XML.
I don't want them in a fixed order. I said @preserveOrder="false" --
isn't that what @preserveOrder is for?
> you also can’t have a choice between “text” or “text with elements”. doesn’t make sense.
No, I agree. I want mixed content which may or may not include text or
any of the elements, just like tei:p.
> are you trying to constrain the order of elements or not?
No. As it says, @preserveOrder="false". It could be that I'm completely
misunderstanding what @preserveOrder is for, though.
Cheers,
Martin
>
> --
> Sebastian Rahtz
> Director (Research) of Academic IT
> University of Oxford IT Services
> 13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
>
> Não sou nada.
> Nunca serei nada.
> Não posso querer ser nada.
> À parte isso, tenho em mim todos os sonhos do mundo.
>
More information about the tei-council
mailing list