Skip to content

Commit

Permalink
xslt update based on metanorma/mn-native-pdf@4146794
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 authored and ronaldtse committed Jul 17, 2022
1 parent ee02eb3 commit 81ea3a3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/isodoc/cc/cc.standard.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -8367,13 +8367,15 @@
</xsl:call-template>
</xsl:template><xsl:template name="insertKeywords">
<xsl:param name="sorting" select="'true'"/>
<xsl:param name="meta" select="'false'"/>
<xsl:param name="charAtEnd" select="'.'"/>
<xsl:param name="charDelim" select="', '"/>
<xsl:choose>
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
<xsl:sort data-type="text" order="ascending"/>
<xsl:call-template name="insertKeyword">
<xsl:with-param name="meta" select="$meta"/>
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
<xsl:with-param name="charDelim" select="$charDelim"/>
</xsl:call-template>
Expand All @@ -8382,6 +8384,7 @@
<xsl:otherwise>
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
<xsl:call-template name="insertKeyword">
<xsl:with-param name="meta" select="$meta"/>
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
<xsl:with-param name="charDelim" select="$charDelim"/>
</xsl:call-template>
Expand All @@ -8391,7 +8394,15 @@
</xsl:template><xsl:template name="insertKeyword">
<xsl:param name="charAtEnd"/>
<xsl:param name="charDelim"/>
<xsl:apply-templates/>
<xsl:param name="meta"/>
<xsl:choose>
<xsl:when test="$meta = 'true'">
<xsl:value-of select="."/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
Expand Down Expand Up @@ -8442,7 +8453,9 @@
<xsl:value-of select="normalize-space($abstract)"/>
</dc:description>
<pdf:Keywords>
<xsl:call-template name="insertKeywords"/>
<xsl:call-template name="insertKeywords">
<xsl:with-param name="meta">true</xsl:with-param>
</xsl:call-template>
</pdf:Keywords>
</rdf:Description>
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
Expand Down

0 comments on commit 81ea3a3

Please sign in to comment.