Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Partly fixing #54
  • Loading branch information
kthoden committed May 29, 2020
1 parent 6c93ab2 commit 2adf79c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/stylesheets/tei2html/tei2html_publ_frontpage_utils.xsl
Expand Up @@ -133,9 +133,7 @@
<xsl:text>link link--green</xsl:text>
</xsl:attribute>
<xsl:attribute name="href">
<xsl:for-each select="//tei:body//tei:div[@type = 'chapter'][1]">
<xsl:call-template name="uri_from_frontpage"/>
</xsl:for-each>
<xsl:text>./1/index.html</xsl:text>
</xsl:attribute>
<span class="link__label">READ ONLINE</span>
</xsl:element>
Expand Down
2 changes: 1 addition & 1 deletion src/stylesheets/tei2html/utils/numbering.xsl
Expand Up @@ -246,7 +246,7 @@

<xsl:template name="uri_from_frontpage" as="xs:string">
<xsl:variable name="chapter" select="ancestor-or-self::tei:div[@type = 'chapter']"/>
<xsl:variable name="chapter_nr" select="count($chapter/preceding-sibling::*)"/>
<xsl:variable name="chapter_nr" select="count($chapter/preceding-sibling::*) + 1"/>
<xsl:choose>
<xsl:when test="self::tei:div[@type ='chapter']">
<xsl:value-of select="concat('./', $chapter_nr , '/index.html')"/>
Expand Down

0 comments on commit 2adf79c

Please sign in to comment.