Print

Print


Kevin Hawkins wrote:
> In developing a TEI customization, I want to constrain the values 
> allowed on a type= attribute for a given element by using valList in my 
> ODD file.  Would this break conformance to the TEI abstract model?  It 
> seems to me that doing would require me to remove the given element from 
> att.typed and then use attDef to add an element called type which 
> behaves differently from the type attribute in att.typed.  This all 
> sounds suspiciously non-conformant to me ...

I don't think this is breaking the TEI abstract model, as long as 
the definition of the attribute you are providing is a subset of 
allowed values and datatype of the original attribute.  The 
document would still validate against tei_all, right?

But I don't think you have to do delete it though, you just 
change/replace the attribute rather than delete and re-add it. So 
something like:

====
<elementSpect ident="bibl" mode="change">
<attList>
   <attDef ident="type" usage="req" mode="change">
    <gloss>type is required on bibl in this schema</gloss>
     <datatype>
        <rng:ref xmlns:rng="http://relaxng.org/ns/structure/1.0" 
  name="datatype.Code"/>
      </datatype>
      <valList type="closed" mode="replace">
         <valItem ident="journalism">
             <gloss>A journalistic item</gloss>
          </valItem>
         <valItem ident="MS">
              <gloss>A manuscript</gloss>
         </valItem>
         <valItem ident="novel">
              <gloss>A novel</gloss>
          </valItem>
          <valItem ident="pamphlet">
              <gloss>A pamphlet</gloss>
            </valItem>
           <valItem ident="unknown">
              <gloss>Something unknown</gloss>
           </valItem>
         </valList>
        </attDef>
       </attList>
  </elementSpec>
====

Erm, but that is typed out from memory so not tested. (And I'm 
not saying that this is a good use of @type on bibl.) Also some 
of this might have changed with the newer modifications to ODD.

However, as that is a pure subset of what is allowed inside @type 
normally, I don't think this has any effect on Conformance.


-James

-- 
Dr James Cummings, Research Technologies Service
OUCS, University of Oxford