[tei-council] easier said...

Piotr Banski bansp at o2.pl
Wed Oct 24 15:50:53 EDT 2012


Hi Council,

What would you do if you had to add a little <ref name="model.global"/> 
to the following:

<content>
     <rng:group>
       <rng:zeroOrMore>
         <rng:ref name="model.headLike"/>
       </rng:zeroOrMore>
       <rng:choice>
         <rng:group>
           <rng:zeroOrMore>
             <rng:ref name="model.pLike"/>
           </rng:zeroOrMore>
         </rng:group>
         <rng:zeroOrMore>
           <rng:choice>
             <rng:ref name="model.labelLike"/>
             <rng:ref name="model.placeStateLike"/>
             <rng:ref name="model.placeEventLike"/>
           </rng:choice>
         </rng:zeroOrMore>
       </rng:choice>
       <rng:zeroOrMore>
         <rng:choice>
           <rng:ref name="model.noteLike"/>
           <rng:ref name="model.biblLike"/>
           <rng:ref name="idno"/>
         </rng:choice>
       </rng:zeroOrMore>
       <rng:zeroOrMore>
         <rng:choice>
           <rng:ref name="model.placeLike"/>
           <rng:ref name="listPlace"/>
         </rng:choice>
       </rng:zeroOrMore>
     </rng:group>
   </content>

?

I realize that using common sense is a fine strategy, but do we have any 
kind of best practice in such cases? (No.)

Whatever I do, I make a choice that I am not so sure I was licensed to 
do, at least a choice concerning the relative ordering of elements.

In the case at hand, I am inclined to just put yet another <zeroOrMore> 
at the end of the group, to be maximally permissive about the possible 
links, given that we didn't have any clear use cases when going for this 
solution (it's about #3060867 [1]).

Good/OK/bad/horrible?

Thanks,

   Piotr

PS. (I know: it's late :-/ )

[1]: 
http://sourceforge.net/tracker/index.php?func=detail&group_id=106328&atid=644065&aid=3060867


More information about the tei-council mailing list