[tei-council] allowText
Martin Holmes
mholmes at uvic.ca
Mon Jun 9 08:25:58 EDT 2014
On 14-06-09 04:43 AM, Sebastian Rahtz wrote:
>
> On 9 Jun 2014, at 12:21, Lou Burnard <lou.burnard at retired.ox.ac.uk> wrote:
>
>> Sorry to bang on about this, but we need to resolve the issue.
>>
>> I want to express in pure ODD the content model (text | a | b)*
>>
>> I can imagine 3 ways this might be done in pure ODD
>>
>> (a) <content allowText="true">
>> <elementRef key="a"/>
>> <elementRef key="b"/>
>> </content>
>>
>> (b) <content allowText="true">
>> <alternate>
>> <elementRef key="a"/>
>> <elementRef key="b"/>
>> </alternate>
>> </content>
>>
>> (c) <content >
>> <alternate allowText="true">
>> <elementRef key="a"/>
>> <elementRef key="b"/>
>> </alternate>
>> </content>
>
> i would go with the most explicit (c) every time, as most extensible/sustainable.
> i don’t read a) as meaning "(text | a | b)*”
What does it seem to you to mean? Of should it just be wrong to have
elementRefs directly in a <content>?
>> Of these only the first currently generates (text | a | b)* The second
>> generates
>> (text | (text | bit | bob))* which is gibberish; the third generates
>> just (a | b)
>>
> behaviour of c) is a bug. a) is tricky - the current output is not ideal,
> but is an LCD
I've been confused about the meaning of <alternate>, which seemed to me
to mean "a or b but not both". The remark on the example in the Glines
suggests this too:
[quote]
<content>
<alternate>
<elementRef key="name"/>
<elementRef key="persName"/>
</alternate>
</content>
Show all
This example content model permits either a name or a persName.
[/quote]
I was looking for a grab-bag element -- <anyOf>, or something like that.
<sequence> also confused me a bit; it seems to mean what it says until
you notice the @preserveOrder, which if false completely undermines its
semantics.
>> Personally, I stand by my view that (a) is the right way to express the
>> required content model. It is not ambiguous unless you think that
>> multiple ungrouped elementRefs implies a sequence. But if that were
>> true, why did we invent the sequence container?
> to group them together in alternates?
>
>> p.s. I haven't included occurrence indicators above; if you do they are
>> always ignored anyway. In the fullness of time they should generate an
>> additional schematron constraint perhaps.
>
> some of them work…
They're important; I find myself wanting to use them everywhere.
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