forked from abaevdict/abaev-basex
handle footnotes correctly, hide internal notes
This commit is contained in:
parent
0e7fb74acf
commit
9151b9eb32
4 changed files with 59 additions and 12 deletions
|
@ -102,6 +102,9 @@
|
|||
</p>
|
||||
</xsl:for-each-group>
|
||||
</div>
|
||||
<div class="notes">
|
||||
<xsl:apply-templates select="//tei:note[@type='footnote']" mode="footnote"/>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each-group>
|
||||
|
@ -131,7 +134,7 @@
|
|||
<xsl:template match="tei:form/tei:orth">
|
||||
<xsl:variable name="elem">
|
||||
<xsl:choose>
|
||||
<xsl:when test="ancestor::tei:cit[@type='formGrp']">i</xsl:when>
|
||||
<xsl:when test="ancestor::tei:cit[@type='formGrp'] or ancestor::tei:re">i</xsl:when>
|
||||
<xsl:otherwise>b</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
@ -335,8 +338,27 @@
|
|||
</td>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match=
|
||||
"text()">
|
||||
<!-- Footnotes -->
|
||||
<xsl:template match="tei:note[@type='footnote']">
|
||||
<xsl:variable name="no"><xsl:number level="single"/></xsl:variable>
|
||||
<a id="fn_{/tei:entry/@xml:id}_{$no}" href="#fntxt_{/tei:entry/@xml:id}_{$no}"><sup><xsl:value-of select="$no"/></sup></a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="tei:note[@type='footnote']" mode='footnote'>
|
||||
<xsl:variable name="no"><xsl:number level="single"/></xsl:variable>
|
||||
<p>
|
||||
<a id="fntxt_{/tei:entry/@xml:id}_{$no}" href="#fn_{/tei:entry/@xml:id}_{$no}"><sup><xsl:value-of select="$no"/></sup></a>
|
||||
<xsl:apply-templates />
|
||||
</p>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Remove internal notes -->
|
||||
<xsl:template match="tei:note[@type='internal']">
|
||||
</xsl:template>
|
||||
|
||||
<!-- get rid of new lines -->
|
||||
|
||||
<xsl:template match="text()">
|
||||
<xsl:value-of select="replace(translate(., '
', ''), ' +', ' ')"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Loading…
Add table
Add a link
Reference in a new issue