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

Martin Holmes mholmes at uvic.ca
Sun Jun 8 10:16:50 EDT 2014


@allowText is defined in att.repeatable and also in content.xml. 
<alternate> and <sequence> are both members of att.repeatable. That is 
the source of my confusion; you say it should only be defined on <content>:

 > 3. @allowText is not supported on anything other than <content> (its
 > presence elsewhere is is a corrigible error in the current spec)

So we could fix that and see where we're at.

Cheers,
Martin

On 14-06-08 06:53 AM, Lou Burnard wrote:
> On 08/06/14 14:36, Martin Holmes wrote:
>> I'm quite confused now. What I like about PureODD is that (I thought)
>> it was relatively transparent and comprehensible.
>
> It is. Just not quite the way you expected. Trust me.
>
>> If this: <elementSpec ident="seg" mode="change"> <content
>> allowText="true"> <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"/> </content> </elementSpec> is different from this:
>> <elementSpec ident="seg" mode="change"> <content allowText="true">
>> <elementRef key="orgName"/> <elementRef key="persName" /> <elementRef
>> key="choice" /> <elementRef key="seg" /> <elementRef key="trait"/>
>> </content> </elementSpec> and (especially) if the latter is somehow
>> impossible, then we need to revisit it and ultimately document it in
>> much more detail.
>
> The latter is correct, and does what you'd expect. The former is not
> correct and should generate warnings/errors, but our current
> implementation scorns such things.
>
> Let me try to summarise the rules as I see them this afternoon:
>
> 1. The content of <content> can be
>
> -- nothing (the element is empty)
>
> -- a single elementRef or macroRef or classRef (the content is a single
> element, a pattern, or a class reference)
>
> -- a sequence or alternation of the foregoing in which case <sequence>
> or <alternate> must be used to group them (and supply occurence
> indicators if required)
>
> 2. The content of <content allowText="true"/> (aka <mixedContent>) can be
>
> -- nothing (the element has text content)
>
> -- one or more elementRefs or macroRefs or classRefs (the specified
> content is alternated with text 0:n times )
>
> -- if sequence or alternation are specified, it is an error since we are
> only supporting XML at present, and it would therefore make no sense to
> allow them
>
> -- likewise for occurrence indicators
>
> 3. @allowText is not supported on anything other than <content> (its
> presence elsewhere is is a corrigible error in the current spec)
>
>
>
>
>
>
>
>


More information about the tei-council mailing list