lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.0.1 vs lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.0.2
- old
+ new
@@ -7,12 +7,10 @@
<xsl:variable name="images" select="document($svg_images)"/>
<xsl:param name="basepath"/>
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
- <xsl:variable name="pageWidth" select="210"/>
- <xsl:variable name="pageHeight" select="297"/>
<xsl:variable name="marginLeftRight1" select="19"/>
<xsl:variable name="marginLeftRight2" select="19"/>
<xsl:variable name="marginTop" select="20.2"/>
<xsl:variable name="marginBottom" select="20.3"/>
@@ -364,60 +362,10 @@
<!-- ============================= -->
<!-- ============================= -->
- <xsl:template match="csd:license-statement//csd:title">
- <xsl:variable name="level">
- <xsl:call-template name="getLevel"/>
- </xsl:variable>
- <fo:block text-align="center" font-weight="bold" role="H{$level}">
- <xsl:apply-templates/>
- </fo:block>
- </xsl:template>
-
- <xsl:template match="csd:license-statement//csd:p">
- <fo:block margin-left="1.5mm" margin-right="1.5mm">
- <xsl:if test="following-sibling::csd:p">
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:block>
- </xsl:template>
-
- <!-- <fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
- <fo:block font-size="10pt" margin-bottom="12pt">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
- <fo:block font-size="10pt" text-indent="7.1mm">
- <fo:block>ISO copyright office</fo:block>
- <fo:block>Ch. de Blandonnet 8 • CP 401</fo:block>
- <fo:block>CH-1214 Vernier, Geneva, Switzerland</fo:block>
- <fo:block>Tel. + 41 22 749 01 11</fo:block>
- <fo:block>Fax + 41 22 749 09 47</fo:block>
- <fo:block>copyright@iso.org</fo:block>
- <fo:block>www.iso.org</fo:block>
- </fo:block> -->
-
- <xsl:template match="csd:copyright-statement//csd:p">
- <fo:block>
- <xsl:if test="preceding-sibling::csd:p">
- <!-- <xsl:attribute name="font-size">10pt</xsl:attribute> -->
- </xsl:if>
- <xsl:if test="following-sibling::csd:p">
- <!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
- <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
- </xsl:if>
- <xsl:if test="not(following-sibling::csd:p)">
- <!-- <xsl:attribute name="margin-left">7.1mm</xsl:attribute> -->
- <xsl:attribute name="margin-left">4mm</xsl:attribute>
- </xsl:if>
- <xsl:apply-templates/>
- </fo:block>
- </xsl:template>
-
-
-
<xsl:template match="csd:title" name="title">
<xsl:variable name="level">
<xsl:call-template name="getLevel"/>
</xsl:variable>
@@ -455,11 +403,11 @@
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
</xsl:element>
</xsl:template>
- <xsl:template match="csd:p">
+ <xsl:template match="csd:p" name="paragraph">
<xsl:param name="inline" select="'false'"/>
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
<xsl:variable name="element-name">
<xsl:choose>
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
@@ -663,11 +611,15 @@
</fo:block-container>
</fo:static-content>
</xsl:template>
-<xsl:variable name="titles_">
+<xsl:variable name="pageWidth_">
+ 210
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
+ 297
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
<title-edition lang="en">
<xsl:text>Edition </xsl:text>
@@ -768,10 +720,57 @@
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
+
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
+
+
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
+
+
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+
+
+
+
+
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
+
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
+
+
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
+
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
<xsl:attribute name="color">blue</xsl:attribute>
<xsl:attribute name="text-decoration">underline</xsl:attribute>
@@ -1582,10 +1581,11 @@
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
+
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
<xsl:attribute name="font-size">65%</xsl:attribute>
@@ -1689,10 +1689,68 @@
</xsl:for-each>
</xsl:template><xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template><xsl:template match="*[local-name()='br']">
<xsl:value-of select="$linebreak"/>
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
+
+ <!-- process in the template 'title' -->
+ <xsl:call-template name="title"/>
+
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
+
+
+ <!-- process in the template 'paragraph' -->
+ <xsl:call-template name="paragraph"/>
+
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
+ <fo:block xsl:use-attribute-sets="license-statement-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
+
+ <!-- process in the template 'title' -->
+ <xsl:call-template name="title"/>
+
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
+
+ <!-- process in the template 'paragraph' -->
+ <xsl:call-template name="paragraph"/>
+
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
+
+ <!-- process in the template 'title' -->
+ <xsl:call-template name="title"/>
+
+
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
+
+ <!-- process in the template 'paragraph' -->
+ <xsl:call-template name="paragraph"/>
+
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
+ <xsl:apply-templates/>
+ </fo:block>
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
+
+ <!-- process in the template 'title' -->
+ <xsl:call-template name="title"/>
+
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
+
+ <!-- process in the template 'paragraph' -->
+ <xsl:call-template name="paragraph"/>
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
<!-- <xsl:call-template name="add-zero-spaces"/> -->
<xsl:call-template name="add-zero-spaces-java"/>
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
@@ -1833,11 +1891,11 @@
<xsl:choose>
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
</xsl:otherwise>
</xsl:choose>
</fo:table>
@@ -2050,11 +2108,11 @@
</xsl:for-each>
</xsl:variable>
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
+ </xsl:template><xsl:template match="*[local-name()='thead']">
<xsl:param name="cols-count"/>
<fo:table-header>
<xsl:apply-templates/>
@@ -2075,17 +2133,17 @@
</fo:table-row>
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
<fo:table-body>
<xsl:apply-templates/>
</fo:table-body>
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
<xsl:apply-templates/>
</xsl:template><xsl:template name="insertTableFooter">
<xsl:param name="cols-count"/>
<xsl:if test="../*[local-name()='tfoot']">
<fo:table-footer>
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
</fo:table-footer>
</xsl:if>
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
<xsl:param name="table_attributes"/>
<xsl:param name="colwidths"/>
@@ -2167,11 +2225,11 @@
<!-- for BSI (not PAS) display Notes before footnotes -->
<!-- except gb and bsi -->
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
+ <xsl:apply-templates select="../*[local-name()='note']"/>
<!-- horizontal row separator -->
@@ -2205,11 +2263,11 @@
</xsl:choose>
</xsl:variable>
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
+ <xsl:apply-templates select="../*[local-name()='thead']">
<xsl:with-param name="cols-count" select="$cols-count"/>
</xsl:apply-templates>
<xsl:call-template name="insertTableFooter">
<xsl:with-param name="cols-count" select="$cols-count"/>
@@ -2347,11 +2405,11 @@
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
<fo:block xsl:use-attribute-sets="table-note-style">
@@ -2370,14 +2428,14 @@
</fo:inline>
- <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
</fo:block>
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
<xsl:apply-templates/>
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
<!-- list of footnotes to calculate actual footnotes number -->
<xsl:variable name="p_fn_">
@@ -2902,11 +2960,13 @@
<td>
<xsl:apply-templates/>
</td>
<td>
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
+ <xsl:with-param name="process">true</xsl:with-param>
+ </xsl:apply-templates>
</td>
</tr>
</xsl:template><xsl:template match="*[local-name()='dt']">
@@ -2929,19 +2989,24 @@
</fo:table-cell>
<fo:table-cell>
<fo:block>
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
+ <xsl:with-param name="process">true</xsl:with-param>
+ </xsl:apply-templates>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
<xsl:apply-templates/>
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
- <xsl:apply-templates select="@language"/>
- <xsl:apply-templates/>
+ </xsl:template><xsl:template match="*[local-name()='dd']">
+ <xsl:param name="process">false</xsl:param>
+ <xsl:if test="$process = 'true'">
+ <xsl:apply-templates select="@language"/>
+ <xsl:apply-templates/>
+ </xsl:if>
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='em']">
<fo:inline font-style="italic">
<xsl:apply-templates/>
@@ -3112,11 +3177,15 @@
<xsl:if test="string-length($text) > 1">
<xsl:call-template name="recursiveSmallCaps">
<xsl:with-param name="text" select="substring($text,2)"/>
</xsl:call-template>
</xsl:if>
- </xsl:template><xsl:template name="tokenize">
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
+ <fo:block break-after="page"/>
+ <fo:block> </fo:block>
+ <fo:block break-after="page"/>
+ </xsl:template><xsl:template name="tokenize">
<xsl:param name="text"/>
<xsl:param name="separator" select="' '"/>
<xsl:choose>
<xsl:when test="not(contains($text, $separator))">
<word>
@@ -3544,14 +3613,14 @@
</xsl:otherwise>
</xsl:choose>
</fo:inline>
</xsl:template><xsl:template match="*[local-name()='appendix']">
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
+ <xsl:apply-templates select="*[local-name()='title']"/>
</fo:block>
- <xsl:apply-templates/>
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
<xsl:variable name="level">
<xsl:call-template name="getLevel"/>
</xsl:variable>
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
@@ -4165,22 +4234,27 @@
<xsl:value-of select="."/>
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
<xsl:value-of select="."/>
</xsl:template><xsl:template match="node()" mode="contents">
<xsl:apply-templates mode="contents"/>
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
<xsl:variable name="level">
<xsl:call-template name="getLevel">
<xsl:with-param name="depth" select="@depth"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="section">
- <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
+ <xsl:choose>
+ <xsl:when test="@type = 'section-title'"/>
+ <xsl:otherwise>
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
- <xsl:variable name="type">floating-title</xsl:variable>
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
<xsl:variable name="display">
<xsl:choose>
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
<xsl:when test="$level <= $toc_level">true</xsl:when>
@@ -4193,11 +4267,20 @@
<xsl:if test="$skip = 'false'">
<xsl:variable name="title">
<xsl:choose>
<xsl:when test="*[local-name() = 'tab']">
- <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
+ <xsl:choose>
+ <xsl:when test="@type = 'section-title'">
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
+ <xsl:text>: </xsl:text>
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="node()"/>
</xsl:otherwise>
</xsl:choose>
@@ -5773,11 +5856,11 @@
</svg>
</fo:instream-foreign-object>
</fo:inline>
</xsl:template><xsl:template match="@language">
<xsl:copy-of select="."/>
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
<xsl:call-template name="title"/>
</xsl:template><xsl:template match="*[local-name() = 'admonition']">
@@ -5832,31 +5915,21 @@
<xsl:param name="format" select="'short'"/>
<xsl:variable name="year" select="substring($date, 1, 4)"/>
<xsl:variable name="month" select="substring($date, 6, 2)"/>
<xsl:variable name="day" select="substring($date, 9, 2)"/>
<xsl:variable name="monthStr">
- <xsl:choose>
- <xsl:when test="$month = '01'">january</xsl:when>
- <xsl:when test="$month = '02'">february</xsl:when>
- <xsl:when test="$month = '03'">march</xsl:when>
- <xsl:when test="$month = '04'">april</xsl:when>
- <xsl:when test="$month = '05'">may</xsl:when>
- <xsl:when test="$month = '06'">june</xsl:when>
- <xsl:when test="$month = '07'">july</xsl:when>
- <xsl:when test="$month = '08'">august</xsl:when>
- <xsl:when test="$month = '09'">september</xsl:when>
- <xsl:when test="$month = '10'">october</xsl:when>
- <xsl:when test="$month = '11'">november</xsl:when>
- <xsl:when test="$month = '12'">december</xsl:when>
- </xsl:choose>
+ <xsl:call-template name="getMonthByNum">
+ <xsl:with-param name="num" select="$month"/>
+ <xsl:with-param name="lowercase" select="'true'"/>
+ </xsl:call-template>
</xsl:variable>
<xsl:variable name="monthStr_localized">
<xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
</xsl:variable>
<xsl:variable name="result">
<xsl:choose>
- <xsl:when test="$format = 'ddMMyyyy'">
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
<xsl:text> </xsl:text>
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
</xsl:when>
<xsl:when test="$format = 'ddMM'">
@@ -5865,15 +5938,61 @@
</xsl:when>
<xsl:when test="$format = 'short' or $day = ''">
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$result"/>
+ </xsl:template><xsl:template name="getMonthByNum">
+ <xsl:param name="num"/>
+ <xsl:param name="lang">en</xsl:param>
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
+ <xsl:variable name="monthStr_">
+ <xsl:choose>
+ <xsl:when test="$lang = 'fr'">
+ <xsl:choose>
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
+ <xsl:when test="$num = '02'">Février</xsl:when>
+ <xsl:when test="$num = '03'">Mars</xsl:when>
+ <xsl:when test="$num = '04'">Avril</xsl:when>
+ <xsl:when test="$num = '05'">Mai</xsl:when>
+ <xsl:when test="$num = '06'">Juin</xsl:when>
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
+ <xsl:when test="$num = '08'">Août</xsl:when>
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$num = '01'">January</xsl:when>
+ <xsl:when test="$num = '02'">February</xsl:when>
+ <xsl:when test="$num = '03'">March</xsl:when>
+ <xsl:when test="$num = '04'">April</xsl:when>
+ <xsl:when test="$num = '05'">May</xsl:when>
+ <xsl:when test="$num = '06'">June</xsl:when>
+ <xsl:when test="$num = '07'">July</xsl:when>
+ <xsl:when test="$num = '08'">August</xsl:when>
+ <xsl:when test="$num = '09'">September</xsl:when>
+ <xsl:when test="$num = '10'">October</xsl:when>
+ <xsl:when test="$num = '11'">November</xsl:when>
+ <xsl:when test="$num = '12'">December</xsl:when>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="normalize-space($lowercase) = 'true'">
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
+ </xsl:choose>
</xsl:template><xsl:template name="insertKeywords">
<xsl:param name="sorting" select="'true'"/>
<xsl:param name="charAtEnd" select="'.'"/>
<xsl:param name="charDelim" select="', '"/>
<xsl:choose>
@@ -6330,9 +6449,28 @@
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
+ </xsl:template><xsl:template name="number-to-ordinal">
+ <xsl:param name="number"/>
+ <xsl:param name="curr_lang"/>
+ <xsl:choose>
+ <xsl:when test="$curr_lang = 'fr'">
+ <xsl:choose>
+ <xsl:when test="$number = '1'">re</xsl:when>
+ <xsl:otherwise>e</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:choose>
+ <xsl:when test="$number = 1">st</xsl:when>
+ <xsl:when test="$number = 2">nd</xsl:when>
+ <xsl:when test="$number = 3">rd</xsl:when>
+ <xsl:otherwise>th</xsl:otherwise>
+ </xsl:choose>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template><xsl:template name="setAltText">
<xsl:param name="value"/>
<xsl:attribute name="fox:alt-text">
<xsl:choose>
<xsl:when test="normalize-space($value) != ''">
\ No newline at end of file