[tei-council] Deleting an attribute from its class, but reinstating it on an element

Lou Burnard lou.burnard at retired.ox.ac.uk
Wed Feb 26 16:09:24 EST 2014


If you delete it from the class, you can't then sneak it back in again. 
Deletion trumps all other specifications. Like my teeth, once they're 
gone, they're gone.

You have to define a completely new  attribute on <category> with an 
attDef mode="add". If it was an element, it would have to be in your 
namespace, but (as we discussed a few weeks ago) all TEI attributes are 
in the null namespace, so there;s nothing to stop you adding this one in 
to the same nonexistent place.

The reason <attRef> is not very well documented is that neither 
Sebastian nor I can ever remember what it's actually for.



On 26/02/14 19:11, Martin Holmes wrote:
> Hi all,
>
> I'm trying to do the following:
>
> 1. Delete @sameAs (among others) from att.global.linking; but
>
> 2. Reinstate it on the <category> element.
>
> I thought this would be the way to do it:
>
> <classSpec ident="att.global.linking" module="linking" type="atts"
> mode="change">
>     <attList>
>       <attDef ident="sameAs" mode="delete"/>
>     </attList>
> </classSpec>
>
> [...]
>
> <elementSpec ident="category" module="header" mode="change">
>     <attList>
>       <attRef class="att.global.linking" name="sameAs"  />
>     </attList>
> </elementSpec>
>
> But the @sameAs attribute doesn't reappear on <category>. I must be
> missing something. Any ideas?
>
> <attRef> is a bit under-documented at the moment, with no mentions in
> the prose of the Guidelines other than its listing in spec lists, and
> only one example, which is a bare element with no context. If I can get
> this working, I'll turn it into a proposed new bit for the Guidelines
> with a full example, since it's a real use-case.
>
> Cheers,
> Martin



More information about the tei-council mailing list