Skip to content

Commit

Permalink
note handling, fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
skurzinz committed Apr 5, 2024
1 parent f963bc2 commit 284a775
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions xslt/editions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,20 @@


<p style="text-align:center;">
<xsl:for-each select=".//tei:note[not(./tei:p)]">
<xsl:for-each select=".//tei:note[not(./tei:p)][ancestor::tei:body]">
<div class="footnotes" id="{local:makeId(.)}">
<xsl:element name="a">
<xsl:attribute name="name">
<xsl:text>fn</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:text>#fna_</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<span style="font-size:7pt;vertical-align:super; margin-right: 0.4em">
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</span>
</a>
</xsl:element>
Expand Down
10 changes: 5 additions & 5 deletions xslt/meta.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@
<div class="container">
<h1><xsl:value-of select="$doc_title"/></h1>
<xsl:apply-templates select=".//tei:body"></xsl:apply-templates>
<xsl:if test=".//tei:note[not(./tei:p)]">
<xsl:if test=".//tei:note[not(./tei:p)][ancestor::tei:body]">
<p style="text-align:center;">
<xsl:for-each select=".//tei:note[not(./tei:p)]">
<xsl:for-each select=".//tei:note[not(./tei:p)][ancestor::tei:body]">
<div class="footnotes" id="{local:makeId(.)}">
<xsl:element name="a">
<xsl:attribute name="name">
<xsl:text>fn</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<a>
<xsl:attribute name="href">
<xsl:text>#fna_</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<span style="font-size:7pt;vertical-align:super; margin-right: 0.4em">
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</span>
</a>
</xsl:element>
Expand Down
8 changes: 4 additions & 4 deletions xslt/partials/shared.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@
</xsl:template>

<!-- footnotes -->
<xsl:template match="tei:note">
<xsl:template match="tei:note[not(./tei:p)][ancestor::tei:body]">
<xsl:element name="a">
<xsl:attribute name="name">
<xsl:text>fna_</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<xsl:attribute name="href">
<xsl:text>#fn</xsl:text>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="normalize-space(.)"/>
</xsl:attribute>
<sup>
<xsl:number level="any" format="1" count="tei:note"/>
<xsl:number level="any" format="1" count="tei:note[not(./tei:p)][ancestor::tei:body]"/>
</sup>
</xsl:element>
</xsl:template>
Expand Down

0 comments on commit 284a775

Please sign in to comment.