Skip to content

Commit

Permalink
Merge pull request #187 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Dec 13, 2023
2 parents f44e4a6 + 9bffe69 commit 601eb2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/isodoc/m3aawg/m3aawg.policy.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10010,10 +10010,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 -->
3
Expand Down
4 changes: 2 additions & 2 deletions lib/isodoc/m3aawg/m3aawg.report.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -10010,10 +10010,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 -->
3
Expand Down

0 comments on commit 601eb2b

Please sign in to comment.