Auto-generated appendix listings will require two things: a TEI divGen element which acts as a trigger to cause the list to be generated, and a Stylesheets template which processes the divGen to create the output. For example, the list of deprecations consists of this DEPRECATIONS.xml file:
Deprecations
About the Deprecation Appendix
This appendix gives you a list of all items (elements,
attributes, attribute values, datatypes etc.) which are deprecated
in this revision of the TEI Guidelines (revision <?insert
revision?> of TEI P5 <?insert version?>).
<div type="div1" xml:id="DEPRECATIONS">
<head>Deprecations</head>
<div>
<head>About the Deprecation Appendix</head>
<p>This appendix gives you a list of all items (elements,
attributes, attribute values, datatypes etc.) which are deprecated
in this revision of the TEI Guidelines (revision <?insert
revision?> of TEI P5 <?insert version?>).</p>
</div>
<divGen type="deprecationcat"/>
</div>
Note that there are two kinds of auto-generated content here: first, the two processing instructions
<?insert revision?> and
<?insert version?>, which are self-explanatory and can simply be used, and
<divGen type="deprecationcat"/>, which was created specifically for this appendix file, and for which processing had to be explicitly written.
If you now look at Stylesheets/common/common_tagdocs.xsl, you'll find this template:
<xsl:template match="tei:divGen[@type = 'deprecationcat']">
<xsl:element namespace="{$outputNS}" name="{$tableName}">
<xsl:attribute name="{$rendName}">
<xsl:text>deprecationcat</xsl:text>
</xsl:attribute>
<!-- .. -->
</xsl:element>
</xsl:template>
<xsl:template match="tei:divGen[@type = 'deprecationcat']">
<xsl:element namespace="{$outputNS}" name="{$tableName}">
<xsl:attribute name="{$rendName}">
<xsl:text>deprecationcat</xsl:text>
</xsl:attribute>
<!-- .. -->
</xsl:element>
</xsl:template>
This template creates a table in whatever the target output format is, listing the deprecations. Note that the table headings are created like this:
<xsl:element namespace="{$outputNS}" name="{$cellName}">
<xsl:element namespace="{$outputNS}" name="{$hiName}">
<xsl:attribute name="{$rendName}">
<xsl:text>label</xsl:text>
</xsl:attribute>
<xsl:attribute name="{$langAttributeName}">
<xsl:value-of select="$documentationLanguage"/>
</xsl:attribute>
<xsl:sequence select="tei:i18n('Identifier')"/>
</xsl:element>
</xsl:element>
<xsl:element namespace="{$outputNS}" name="{$cellName}">
<xsl:element namespace="{$outputNS}" name="{$hiName}">
<xsl:attribute name="{$rendName}">
<xsl:text>label</xsl:text>
</xsl:attribute>
<xsl:attribute name="{$langAttributeName}">
<xsl:value-of select="$documentationLanguage"/>
</xsl:attribute>
<xsl:sequence select="tei:i18n('Identifier')"/>
</xsl:element>
</xsl:element>
where the keyword Identifier is used to look up the appropriate language translation in the Stylesheets/i18n.xml file. If those items already exist in the file, you can simply use them, but if you are creating headings which do not yet have entries, you will need to add them to Stylesheets/i18n.xml like this:
Identifier
Identifier
<entry>
<key>Identifier</key>
<text xml:lang="en" lang3="eng">Identifier</text>
</entry>
and if you are competent to add the equivalent translations in any of the Guidelines languages, you can add them alongside the English version:
Description
Description
Beschreibung
Description
Descrizione
<entry>
<key>Description</key>
<text xml:lang="en" lang3="eng">Description</text>
<text xml:lang="de" lang3="deu">Beschreibung</text>
<text xml:lang="fr" lang3="fra">Description</text>
<text xml:lang="it" lang3="ita">Descrizione</text>
</entry>
Only when all these pieces are in place can the new appendix function correctly. It would normally be appropriate to do work on this scale in a branch of the repo, but this is a little complicated by the fact that you need to edit two repositories separately. It is fine to make the changes in the TEI repository first, resulting in an appendix page that simply lacks its listing, then do the Stylesheets changes to make the listing.