Overview

This is a personal note on how to restrict attributes used for tags according to your project using Roma.

Background

In the following article, I described how to restrict tags according to your project using Roma.

This time, as an extension of that, we will customize the attributes used for each tag.

Use Case

Here, as an example, we will try restricting the available attributes for persName.

When using the default (tei_all.rng) with Oxygen XML Editor, as shown below, many options are presented as available attributes for the persName tag.

On the other hand, when using the customized rng file described in this article, as shown below, only 5 attributes are available.

By restricting the available tags and attributes for each project in this way, we can expect to reduce the burden on data entry personnel and improve validation efficiency.

Procedure

Referring to the following article, start by either creating a new ODD file in Roma or loading an existing ODD file.

Then, confirm that persName, our target for this time, is checked.

Next, click the persName link above to navigate to the following screen.

Then, click on attributes. On this page, you can restrict which attributes to use.

In the following example, although it may be a bit hard to see, the key attribute is kept as one to use, while the xml:lang attribute is excluded as one not to use.

Additionally, you can create new attributes,

or import from existing ones (I am not sure if “import” is the correct term).

To be able to save these customizations, download the ODD file via Download > “Customization as ODD”. Also, select “RELAX NG Schema” or similar to download the file to actually use with TEI/XML.

For details, please refer to the following.

Reference: Customizing Descriptions

Roma

RELAX NG Schema

<de/eldf<eeiem/fnleeiee<<<n<<<<<<lnmarpt/rrrrreeene:eapeeeeemm>andftx<hafffffpemtotmsa/ttnecnelcsstnnnnnyt=nuarnhxx<ceaaaaa/>"ammns:mmsnhrmmmmm>tmee:rllco:neeeeeeen=xrunnhr>=====i=t"mnlss:tu"""""_"atlge:=aeltttttppten=x"sxeeeeeeeeiis"xihst>iiiiirro_=hm=teu_____ssnm"tl"traaaaaaNNahtnhptltttttaaxctpst:tttttmmmrt::t/tsbc.....eelop/sp/eyuocgggg""n.:c:wsstnallll>>sprh/wtttnoooo:h/e=/w=eteobbbbarpl"w."mhnnaaaa=auahwtssitillll"srxtwets.c....helnt.iro<aaalatS.gpw-ir</lttinteo.:3cnss.ttnapqco/..gcccarrkl:"lroo-ahhtiiiy/cgprrll::tbbnt.uggeenaruugirnr//nnasitt.cersl2ngdmsbeea.lg.0staeeu..taaso0/hr/rtxnttxdtc11(s>tem"rtnsrl/.>.l/irgducX0ntki>bi.lc.I"ooedubo/tonry"tursurccmw"etgcrgloah.e/heunlic.neddticoasm1seezhrn/a.d"xeract0lt-te"or"/=shs/mos"pep>pnicta"a"dhecd/t=eiea>i"m:(tbta*.eiet[)lir@ri_oc)ethnapyi"lgr/_eteadnsnnd0ensa"no-r>ttp]eae"@dtr>cisaboNlynaesmnt/edh1-ae.cr0ac"lio>enn(ndtpdieeacnrrats-toceonhsfaelcotknhn-eiapsmeoerre)slNmeaommreeen-tcobnesltornagisn,t-r[u1l4e.-22.31".>PersonalNames]</a:documentation>

LEAF Writer

Summary

I hope this serves as a useful reference for introducing TEI/XML.