Glossaries are found as the first <div1> in the back section of a text. Because glossaries are often shared between several related documents (e.g. Sera Hermitages), they are stored as separate XML files that are included within each essay using that glossary. This is done by an entity declaration for the glossary within the DTD statement, and a reference to that entity in the back section of the text where the glossary is to be inserted. Thus, for Sera Hermitages document the glossary include would look like:
<!DOCTYPE TEI.2 SYSTEM "http://www.thdl.org/global/xml/dtds/xtib3.dtd" [ <!ENTITY % extlinks SYSTEM "../external-links.dtd" > %extlinks; <!ENTITY glossary SYSTEM "glossaries/cabezon-sera-herm-gloss.xml"> … {other entity declarations} … ]> <TEI.2> <teiHeader lang="eng"> … </teiHeader> <text> <front> … </front> <body> … </body> <back> &glossary; </back> </text> </TEI.2>
Glossaries are located in a "glossaries" sub-folder along side the XML document. Thus, since all the Sera Hermitage essays were written by Jose Cabezon, they are found in trunk/essays/xml/c/ and their shared glossary is found in trunk/essays/xml/c/glossaries. Should another author, say with the last name Cabot, also write an essay with a glossary for THL. His glossary would go in the same folder.
Glossary file names are prefaced with the author's last name followed by an abbreviated descriptive name and ending with "-gloss.xml". Thus, for Sera hermitages the file name is: cabezon-sera-herm-gloss.xml.
All the glossary entries are found in a single <div1> element with an unique id of "c1" ("c" stands for the back section and "1" stands for the first subsection of the back section) and a type attribute set to "glossary". Glossary entries are arranged in Tibetan alphabetical order with each letter-section prefaced by an <anchor> tag that identifies that section. Sanskrit, Chinese and Mongolian only terms are found in the own sections at the end of the glossary. The anchor element for each subsection of the glossary has a type="tiblet" for Tibetan letter sections or type="language name" for other languages. Tibetan letter sections have an n attirbute set to the wylie for that letter and a rend attribute set to the capitalized version for display purposes.
Each entry within a subsection is found in a <p> element with a unique id="entry###". These paragraph elements have the following children in the following order:
An example of the beginning of a glossary file with its first term is found below:
<div1 id="c1" type="glossary"> <head>Glossary</head> <anchor type="tiblet" n="ka" rend="Ka"/> <p id="entry337"> <num n="tib-sort-order">1</num> <term lang="tib" n="katung">ka thung</term> <term lang="eng">short pillar</term> <term lang="san"/> <term lang="chi"/> <term lang="mon"/> <rs type="type" n="term">Term</rs> <date value=""/> <rs type="lang">tib</rs> </p> .... </div1>