Print

Print


I found something which seemed odd to me about changing the definition
of an attribute class in ODD.

I tried to use classSpec with mode="change" to modify the valList of the
att.global class, but I found I also lost the att.global class's
super-classes, unless I specified them again with a "classes" element.

Is this a bug? 

e.g.

<classSpec ident="att.global" module="tei" mode="change" type="atts">

  <!-- 
  the att.global class is already defined to be a
  member of these classes, but if I change the 
  att.global class with my classSpec[@mode='change'],
  then I must also specify the classes again;
  if I omit these classes, then the att.global class
  will lose its membership of any classes
  -->
  <classes>
    <memberOf key="att.global.linking"/>
    <memberOf key="att.global.analytic"/>
  </classes>

  <!-- 
  this is the change I actually want to make -
  to restrict the value of the rend attribute
  -->
  <attList mode="change">
    <attDef ident="rend" usage="rwa" mode="change">
      <datatype>
        <rng:ref name="data.enumerated"/>
      </datatype>
      <valList type="closed" mode="add">
        <valItem ident="b">
          <gloss>bold</gloss>
        </valItem>
        <valItem ident="c">
          <gloss>caps</gloss>
        </valItem>
        <valItem ident="i">
          <gloss>italic</gloss>
        </valItem>
        <valItem ident="lc">
          <gloss>lowercase</gloss>
        </valItem>
        <valItem ident="sc">
          <gloss>mixed small caps</gloss>
        </valItem>
        <valItem ident="lsc">
          <gloss>small caps</gloss>
        </valItem>
        <valItem ident="strike">
          <gloss>strike-through</gloss>
        </valItem>
        <valItem ident="sup">
          <gloss>superscript</gloss>
        </valItem>
        <valItem ident="sub">
          <gloss>subscript</gloss>
        </valItem>
        <valItem ident="u">
          <gloss>underline</gloss>
        </valItem>
        <valItem ident="block">
          <gloss>whole paragraph justified</gloss>
        </valItem>
        <valItem ident="center">
          <gloss>centered</gloss>
        </valItem>
        <valItem ident="hang">
          <gloss>all lines except first indented</gloss>
        </valItem>
        <valItem ident="indent">
          <gloss>first line indented</gloss>
        </valItem>
        <valItem ident="right">
          <gloss>right justified</gloss>
        </valItem>
        <valItem ident="screen">
          <gloss>coloured or shaded background</gloss>
        </valItem>
      </valList>
    </attDef>
  </attList>
</classSpec>