Customizing TEI
Here it comes, step by step processes to customize TEI.
Add an element
- Go to www.tei-c.org/Roma
- Upload a customization : ODD file (One Document Does it all)
- Click Start
- Click on Add elements tab
- Add all the elements you want to add
Add an attribute
- Go to www.tei-c.org/Roma
- Upload a customization : ODD file (One Document Does it all)
- Click Start
- Click on Add elements tab
- To the right of your newly added element, you will find Change attributes
- Either click on Add new attributes or on the name of your newly added attribute if any
- Choose if it is optional
- Contents : which type, which quantity
- Defaut value if any
- Closed list and list of values if required
- Add some description
- Save
- Save (twice)
What is really lackin here
Element content is at the bottom of the page, it should be written in valid XML. But there’s no assistant for that here.
Where to find some documentation
http://www.tei-c.org/Guidelines/Customization/odds.xml
How to write directly inside the ODD
Some of the treatments cannot be easily defined inside ROMA, that’s where a text editor is welcome.
If you open your ODD inside a text editor, have a look at the declaration of a new attribute :
<elementSpec ident="readerStatus" ns="http://readingexp.univ-lemans.fr/tei" mode="add">
<desc/>
<classes>
<memberOf key="att.global"/>
</classes>
<content>
<rng:zeroOrMore>
<rng:choice>
<rng:attribute>
<rng:anyName/>
</rng:attribute>
<rng:text/>
<rng:element>
<rng:anyName/>
<ref name="readerStatus"/>
</rng:element>
</rng:choice>
</rng:zeroOrMore>
</content>
<attList>
<attDef ident="ref" mode="add">
<desc>Reference</desc>
<datatype minOccurs="0" maxOccurs="1">
<rng:ref name="data.text"/>
</datatype>
</attDef>
</attList>
</elementSpec>
This readerStatus element has its classes, contents and attributes defined here, and can contain itself (look inside the content).