ODD Editing Tips: Part 1
Restricting an Element’s Attributes to Specific Ones Only By default in TEI, elements inherit many attribute classes (att.global, att.datable, etc.), making numerous attributes available. If you want to allow only specific attributes, configure it as follows. Example: Allowing Only xml:id and corresp on persName < e / l < < e e c / a / l m l < < < < < < < c t < < a e e a ! m m m m m m l t a / a / t m n s - e e e e e e a L t < < a t < < a t e t s - m m m m m m s i t d d / t t d d / t L n S e b b b b b b s s D e a < d t D e a < d t i t p s 属 e e e e e e e t e s t d a D e s t d a D s S e 性 r r r r r r s > f c a a t e f c a a t e t p c m ク O O O O O O > > t t a f > t t a f > e o ラ f f f f f f i 要 y a t > i 関 y a t > c i d ス d 素 p R y d 連 p R y > d e を k k k k k k e の e e p e す e e p e = 削 e e e e e e n 一 > f e n る > f e n " 除 y y y y y y t 意 > t 人 > t c ( = = = = = = = な n = 物 k = h モ " " " " " " " 識 a " 情 e " a デ a a a a a a x 別 m c 報 y p n ル t t t t t t m 子 e o へ = e g ク t t t t t t l < = r の " r e ラ . . . . . . : / " r リ t s " ス g c d e p t i d I e ン e N > は l m a d e y d e D s ク i a 維 o c t i r p " s " p < d m 持 b " a t s e c / " / a e ) a b L o d m > > d t " l m l i n " o m e a " o e k a d o s . m d " e l m e d c p o m e " " o = e > o d o = m d " = i e d " o m m e a " n = e d d o o = d a t " = e e d d " d d e c " l = e e d " d r h d e " = = e " " a e t d " " l u / n l e e d d e s u > g e " l e e t a s e t / e l l e g a " e > t e e " e g > " e t t / = e / " e e > " = > / " " o " > / / p o > > t p " t > " > Key Points Use <classes mode="change">: If you use mode="replace" and leave it empty, the model classes will also be deleted, making the element itself unusable Delete attribute classes individually: Remove unnecessary attribute classes with <memberOf key="att.xxx" mode="delete"/> Add required attributes: Define the attributes you want to allow with <attDef ident="xxx" mode="add"> Notes You can check which attribute classes an element belongs to in the TEI Guidelines Deleting att.global will also remove xml:id, xml:lang, etc., so add them individually as needed Adding Attributes to an Element When adding a new attribute while keeping existing attribute classes: ...