[tei-council] Wot is wrong with my ODD?
Sebastian Rahtz
sebastian.rahtz at it.ox.ac.uk
Sat Jun 7 12:36:58 EDT 2014
On 7 Jun 2014, at 13:26, Lou Burnard <lou.burnard at retired.ox.ac.uk> wrote:
> A little more experimentation shows that @allowText only works as you'd
> expect in a very small number of specific cases, and can also lead to
> your generating an invalid schema.
we need to decide whether it _should_ work in the other cases.
> For example:
>
> <elementSpec ident="stuff">
> <desc>élément racine d'un schéma simplissime</desc>
> <content allowText="true">
> <elementRef key="bit"/>
> <elementRef key="bob"/>
> <elementRef key="t1"/>
> </content>
> </elementSpec>
>
> does what you'd expect and generates the following RNC
>
> element stuff { (text | bit | bob | t1)* }
>
> (it produces the following nonsense in DTD though
>
> <!ELEMENT stuff (#PCDATA | bitbobt1)*>
> - that's a bug!)
indeed. i agree.
>
> Placing @allowText on <alternate> or <sequence> however has no effect:
>
> <content >
> <alternate allowText="true" minOccurs="0"
> maxOccurs="unbounded">
> <elementRef key="bit"/>
> <elementRef key="bob"/>
> <elementRef key="t1"/>
> </alternate>
> </content>
>
> generates
>
> element stuff { ( bit | bob | t1)* }
>
> (but at least the DTD generated is correct)
these are bugs, I agree
>
> The presence of @allowText also implies alternation of its children.
>
> Hence:
>
> <content allowText="true">
> <alternate minOccurs="0" maxOccurs="unbounded">
> <elementRef key="bit"/>
> <elementRef key="bob"/>
> <elementRef key="t1"/>
> </alternate>
> </content>
>
> generates this monster
> * element stuff { (text | (text | bit | bob | t1)*)* }*
that should be factored out, I agree.
> Definitive word must await the return of the mighty Rahtz from
> Brussells, where I assume he is busy ensuring the election of Herr Juncker.
only if Mr Juncker is interested in RDM.
--
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