[tei-council] data.multipleEnumerated

Syd Bauman Syd_Bauman at Brown.edu
Thu Mar 1 15:51:57 EST 2007


Sebastian -- 

Is there any chance of implementing a repeatable enumeration?


This would be a change to ODD such that there is some mechanism
(e.g., a 'repeatable="yes"' attribute on <valList>) to define an
enumeration of possible attribute values which could be repeated,
i.e. instead of boiling down to

       ( "list" | "of" | "valItem" | "idents" )

would boil down to

       list { ( "list" | "of" | "valItem" | "idents")+ }

This would permit one or more of the listed values to be specified
(with repetition possible), but still flag as invalid any value not
in the list. Thus, given the above declarations the values

   "idents"
   "valItem idents"
   "of list of idents"

are valid, but

   "valitem"
   "List of"
   "1724"

are not.

This mechanism would be very useful in the declaration of several
attributes. E.g., type= of <metDecl>, which currently has a fragment
of Relax NG in the <datatype>, could be re-written declaratively:

      <valList type="closed" repeatable="yes">
        <valItem ident="met"/>
        <valItem ident="rhyme"/>
        <valItem ident="real"/>
      </valList>

Although TEI would not use it for vanilla P5, one could well imagine
users creating ODDs for their projects taking advantage of this
mechanism for their local constraint of rend=:

    <attDef ident="rend" usage="opt" mode="change">
      <datatype>
        <rng:ref name="data.multipleEnumerated"/>
      </datatype>
      <valList type="closed" repeatable="yes">
        <valItem ident="it"><desc>italics</desc></valItem>
        <valItem ident="bo"><desc>boldface</desc></valItem>
        <valItem ident="sc"><desc>small caps</desc></valItem>
        <valItem ident="L"><desc>larger than surrounding text</desc></valItem>
        <valItem ident="S"><desc>smaller than surrounding text</desc></valItem>
      </valList>
    </attDef>


Council --

Is there any reason to avoid doing so?




More information about the tei-council mailing list