-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2618 from TEIC/sydb_2617_table_of_modules
table of modules — re-generated based on new utility
- Loading branch information
Showing
2 changed files
with
166 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
generate_module_table.xsl | ||
Written 2024-11-16 by Syd Bauman, based in part on modules.xsl, | ||
itself written 2004-10-06 by Arno Mittelbach <[email protected]>. | ||
Copyleft 2024 by Syd Bauman and the Text Encoding Initiative Consortium. | ||
Read in TEI P5, write out an TEI table listing the modules. The table is | ||
intended to be inserted into the Guidelines in section #STMA. | ||
Written to help address TEI issue 2617 <https://github.com/TEIC/TEI/issues/2617>. | ||
--> | ||
|
||
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns="http://www.tei-c.org/ns/1.0" | ||
xmlns:tei="http://www.tei-c.org/ns/1.0" | ||
xpath-default-namespace="http://www.tei-c.org/ns/1.0" | ||
expand-text="yes"> | ||
|
||
<xsl:output method="xml" indent="yes"/> | ||
|
||
<xsl:template match="/"> | ||
<xsl:comment> following table generated by {static-base-uri()} at {current-dateTime()} </xsl:comment> | ||
<xsl:comment> based on {normalize-space(/*/teiHeader/fileDesc/editionStmt)} </xsl:comment> | ||
<table xml:id="tab-mods"> | ||
<row role="label"> | ||
<cell>Module name</cell> | ||
<cell>Where defined</cell> | ||
<cell>Formal public identifier</cell> | ||
</row> | ||
<xsl:apply-templates select="//tei:moduleSpec"> | ||
<!-- The default sort order, document order, should get these in order by chapter # --> | ||
</xsl:apply-templates> | ||
</table> | ||
</xsl:template> | ||
|
||
<xsl:template match="tei:moduleSpec" as="element(tei:row)"> | ||
<row> | ||
<cell>{@ident}</cell> | ||
<cell><ptr target="#{ancestor::tei:div[@xml:id][last()]/@xml:id}"/></cell> | ||
<cell>{tei:idno[ @type eq 'FPI']}</cell> | ||
</row> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |