Skip to content

Commit

Permalink
add end notes for NOTE1/NOTE2
Browse files Browse the repository at this point in the history
  • Loading branch information
respinos committed Oct 17, 2023
1 parent 66defce commit 3ecd4ca
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
27 changes: 23 additions & 4 deletions templates/text/qbat/includes/qbat.text.components.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,12 @@
</xsl:template>

<!-- #################### -->
<xsl:template match="tei:NOTE/tei:NOTE1|tei:NOTE/tei:NOTE2" priority="101">
<p>
<xsl:apply-templates />
</p>
</xsl:template>

<xsl:template match="tei:NOTE1|tei:NOTE2">
<xsl:choose>
<xsl:when test="not(@HREF)">
Expand Down Expand Up @@ -749,7 +755,7 @@
<a
class="button button--secondary button--highlight footnote-link"
id="back{@ID}"
href="fn{@ID}">
href="#fn{@ID}">
<xsl:choose>
<xsl:when test="@N != '*'">
<xsl:value-of select="@N" />
Expand Down Expand Up @@ -926,6 +932,9 @@
<xsl:apply-templates select="tei:TITLE" />
</cite>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

Expand Down Expand Up @@ -1666,13 +1675,23 @@

<xsl:template match="tei:NOTE/node()[@ID]" mode="note">
<xsl:variable name="id" select="@ID" />
<xsl:variable name="ptr" select="//tei:PTR[@TARGET=$id]" />
<!-- <xsl:variable name="ptr" select="//tei:PTR[@TARGET=$id]" /> -->
<xsl:variable name="N">
<xsl:choose>
<xsl:when test="@HREF">
<xsl:value-of select="@N" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//tei:PTR[@TARGET=$id]/@N" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div class="flex flex-flow-row gap-1 flex-align-start"
id="fn{$id}">
<div class="text-bold text-medium">
<xsl:choose>
<xsl:when test="$ptr/@N">
<xsl:value-of select="$ptr/@N" />
<xsl:when test="$N">
<xsl:value-of select="$N" />
</xsl:when>
<xsl:otherwise>
<span class="material-icons">hash</span>
Expand Down
4 changes: 3 additions & 1 deletion templates/text/qui/qui.header.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<xsl:variable name="label">
<xsl:choose>
<xsl:when test="Divhead/HEAD">
<xsl:value-of select="Divhead/HEAD" />
<xsl:apply-templates select="Divhead/HEAD" mode="copy" />
</xsl:when>
<xsl:when test="key('get-lookup',@TYPE)">
<xsl:value-of select="key('get-lookup', @TYPE)" />
Expand Down Expand Up @@ -152,6 +152,8 @@
</qui:li>
</xsl:template>

<xsl:template match="Divhead/HEAD/NOTE1|Divhead/HEAD/NOTE2" priority="101" mode="copy" />

<xsl:template match="Top/Item" mode="metadata">
<xsl:variable name="encoding-type">
<xsl:value-of select="DocEncodingType" />
Expand Down
5 changes: 5 additions & 0 deletions templates/text/qui/qui.text.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
<qui:block slot="notes"
mimetype="application/tei+xml"
>
<xsl:for-each select="/Top/FullTextResults/DocContent//NOTE1|/Top/FullTextResults/DocContent//NOTE2">
<tei:NOTE>
<xsl:apply-templates select="." mode="copy" />
</tei:NOTE>
</xsl:for-each>
<xsl:apply-templates select="/Top/FullTextResults/NOTES" mode="copy-guts" />
</qui:block>

Expand Down

0 comments on commit 3ecd4ca

Please sign in to comment.