[tei-council] Wot is wrong with my ODD?
Martin Holmes
mholmes at uvic.ca
Sun Jun 8 22:39:19 EDT 2014
How would I do this in PureODD?
I'd like the content model of <person> to be any of:
persName (exactly one)
affiliation (optional)
birth (optional)
death (optional)
residence (at least one)
occupation (optional)
affiliation (optional)
pb (optional)
cb (optional)
milestone (optional)
in any order. No text content. I would have guessed this:
<content allowText="false">
<sequence minOccurs="1" maxOccurs="unbounded" preserveOrder="false">
<elementRef key="persName" maxOccurs="1" minOccurs="1"/>
<elementRef key="birth" maxOccurs="1" minOccurs="0"/>
<elementRef key="death" maxOccurs="1" minOccurs="0"/>
<elementRef key="residence" maxOccurs="unbounded" minOccurs="1"/>
<elementRef key="occupation" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="affiliation" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="pb" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="cb" maxOccurs="unbounded" minOccurs="0"/>
<elementRef key="milestone" maxOccurs="unbounded" minOccurs="0"/>
</sequence>
</content>
but that gets me:
<oneOrMore>
<group>
<ref name="persName"/>
<optional>
<ref name="birth"/>
</optional>
<optional>
<ref name="death"/>
</optional>
<oneOrMore>
<ref name="residence"/>
</oneOrMore>
<zeroOrMore>
<ref name="occupation"/>
</zeroOrMore>
<zeroOrMore>
<ref name="affiliation"/>
</zeroOrMore>
<zeroOrMore>
<ref name="pb"/>
</zeroOrMore>
<zeroOrMore>
<ref name="cb"/>
</zeroOrMore>
<zeroOrMore>
<ref name="milestone"/>
</zeroOrMore>
</group>
</oneOrMore>
which disallows <pb/> if it occurs before persName.
Cheers,
Martin
On 14-06-08 02:18 PM, Sebastian Rahtz wrote:
>
> On 8 Jun 2014, at 22:10, Lou Burnard <lou.burnard at retired.ox.ac.uk> wrote:
>
>>> I dont think the content model should be different depending on the existence of @allowText.
>>
>> We could go back to having a different element (<mixedContent>) then? with a different content model/semantics?
> i dont see a need
>
>>> i would turn this around, and say that you continue to use sequence or alternate as you
>>> desire, but that only alternate + @allowText makes sense if you’re generating XML
>>> schemas, so a <sequence> would be rewritten as an alternate at the moment in this situation
>>
>> So sometimes my <sequence> generates a sequence, and sometimes it generates an alternation? I thought you didn't like ambiguity?
>>
>
> no, your <sequence> always means sequence; but if you generate an XML schema, that will only
> reflect the alternation. in due course, we add Schematron to enforce the sequencing. Not the same
> thing as ambiguity
>
>>
>>>> 3. @allowText is not supported on anything other than <content> (its
>>>> presence elsewhere is is a corrigible error in the current spec)
>>> disagree, for futre proofing.
>>
>> I hear what you're saying. But we don't want a dozen ways of doing the same thing.
>
> true as a principle, of course, but I dont see the relevance here.
>
>>> we need Schematron rules which enforce XML, not a weakening of Pure ODD
>>>
>> hear hear
>
> good, we agree on that at least
> --
> 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