[tei-council] Mode attribute for <classes>

Laurent Romary laurent.romary at loria.fr
Mon Sep 3 10:51:31 EDT 2007


My point was to have the same mechanism for modifying class  
relationships as we have for other aspects of an elementSpec.
In the current version, the only way to change the classes attached  
to an element is to make a complete <classes> declaration with all  
new and old classes. Beyond the fact that it is not coherent with the  
rest of the specification mechanisms, it prevents anyone to know what  
is actually deleted or added from the initial declaration. I would  
thus suggest to add a mode attribute both for <classes> and  
<memberOf>, with the following meaning:
- <classes mode="change"> means look inside at he mode attributes of  
the embedded <memberOf> (see below).
- <classes mode="delete"> means all <memberOf> declarations have to  
be removed from the existing element specification
- <classes mode="add"> means all <memberOf> declarations should be  
added to the existing element specification

- <memberOf mode="add"> means the relation should be added to the  
existing element specification
- <memberOf mode="delete"> means the relation should be deleted from  
the existing element specification

This specification allows the same thing to be expressed in two  
different ways, for instance an addition and a deletion could be  
either expressed as
                 <elementSpec>
                     <classes mode="change">
                         <memberOf mode="del" key="X"/>
                         <memberOf mode="add" key="Y"/>
                     </classes>
                 </elementSpec>
or

                 <elementSpec>
                     <classes mode="del">
                         <memberOf  key="X"/>
                     </classes>
                     <classes mode="add">
                         <memberOf key="Y"/>
                     </classes>
                 </elementSpec>

But (unless it is a major implementation problem => Seb?) we should  
leave this choice to the users.
Best wishes,
Laurent



More information about the tei-council mailing list