[tei-council] Wot is wrong with my ODD?
Martin Holmes
mholmes at uvic.ca
Sat Jun 7 17:44:38 EDT 2014
On 14-06-07 02:38 PM, Martin Holmes wrote:
> On 14-06-07 02:37 PM, Lou Burnard wrote:
>> On 07/06/14 22:33, Martin Holmes wrote:
>>> 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?
>>
>> Then all you need is
>>
>> <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>
>
> I'm pretty sure that's the first thing I tried, but it didn't work; the
> resulting RNG disallowed <seg>just text</seg>. But I'll try it again...
It gets me this:
<define name="seg">
<element name="seg">
<a:documentation
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">(arbitrary
segment) represents any segmentation of text below the chunk level.
[16.3. 6.2. 7.2.5. ]</a:documentation>
<zeroOrMore>
<ref name="orgName"/>
</zeroOrMore>
<zeroOrMore>
<ref name="persName"/>
</zeroOrMore>
<zeroOrMore>
<ref name="choice"/>
</zeroOrMore>
<zeroOrMore>
<ref name="seg"/>
</zeroOrMore>
<zeroOrMore>
<ref name="trait"/>
</zeroOrMore>
<ref name="att.global.attributes"/>
<ref name="att.segLike.attributes"/>
<ref name="att.responsibility.attributes"/>
<optional>
<attribute name="type">
<a:documentation
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">characterizes
the element in some sense, using any convenient classification scheme or
typology.</a:documentation>
<ref name="data.enumerated"/>
</attribute>
</optional>
<optional>
<attribute name="subtype">
<a:documentation
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0">provides a
sub-categorization of the element, if needed</a:documentation>
<ref name="data.enumerated"/>
</attribute>
</optional>
<empty/>
</element>
</define>
which doesn't seem to let me have text in it. So it does seem that
@allowText isn't working here.
Cheers,
Martin
> Cheers,
> Martin
>
More information about the tei-council
mailing list