Skip to content

Commit

Permalink
Merge pull request #250 from metanorma/feature/xslt-update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 7, 2023
2 parents 258912b + 40bafc1 commit 8525b29
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/isodoc/cc/cc.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4785,8 +4785,17 @@
<xsl:variable name="styles_">
<xsl:for-each select="xalan:nodeset($styles__)/item">
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
<xsl:if test="$key = 'font-family' or $key = 'color'">
<xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
<xsl:variable name="value">
<xsl:choose>
<!-- if font-size is digits only -->
<xsl:when test="$key = 'font-size' and translate($value_, '0123456789', '') = ''"><xsl:value-of select="$value_"/>pt</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value_"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
<style name="{$key}"><xsl:value-of select="$value"/></style>
</xsl:if>
</xsl:for-each>
Expand Down

0 comments on commit 8525b29

Please sign in to comment.