Skip to content

Commit

Permalink
xslt update based on metanorma/mn-native-pdf@abbf41d
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 authored Nov 7, 2023
1 parent 4059605 commit fb0ea43
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/isodoc/jis/jis.international-standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -5835,8 +5835,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 fb0ea43

Please sign in to comment.