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

Martin Holmes mholmes at uvic.ca
Wed Feb 26 16:24:03 EST 2014


Fair enough. I'll have to introduce my own impersonation of @sameAs 
(perhaps it's the sameAs the TEI attribute, perhaps not).

Now I can't imagine what <attRef> is for either. Perhaps it could be 
used to add an attribute from a class to an element which is not a 
member of that class?

Cheers,
Martin

On 14-02-26 01:09 PM, Lou Burnard wrote:
> 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