Skip to content

Commit

Permalink
xslt update based on metanorma/mn-native-pdf@1408bf4
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 authored Dec 13, 2023
1 parent 5eb0808 commit 32bdf6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/isodoc/cc/cc.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -9900,10 +9900,10 @@

<xsl:variable name="toc_level">
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
<xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
<xsl:choose>
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
<xsl:otherwise><!-- default value -->
2
Expand Down

0 comments on commit 32bdf6e

Please sign in to comment.