lib/isodoc/mpfa/mpfd.guidelines.xsl in metanorma-mpfa-0.5.8 vs lib/isodoc/mpfa/mpfd.guidelines.xsl in metanorma-mpfa-0.5.9
- old
+ new
@@ -326,20 +326,20 @@
<xsl:choose>
<xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!--• dash -->
<xsl:otherwise> <!-- for ordered lists -->
<xsl:choose>
<xsl:when test="../@type = 'arabic'">
- <xsl:number format="a)"/>
+ <xsl:number format="a)" lang="en"/>
</xsl:when>
<xsl:when test="../@type = 'roman'">
<xsl:number format="1)"/>
</xsl:when>
<xsl:when test="../@type = 'alphabet'">
- <xsl:number format="a)"/>
+ <xsl:number format="a)" lang="en"/>
</xsl:when>
<xsl:otherwise>
- <xsl:number format="a)"/>
+ <xsl:number format="a)" lang="en"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -1321,14 +1321,16 @@
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
<xsl:variable name="colwidths">
- <xsl:call-template name="calculate-column-widths">
- <xsl:with-param name="cols-count" select="$cols-count"/>
- <xsl:with-param name="table" select="$simple-table"/>
- </xsl:call-template>
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
+ <xsl:call-template name="calculate-column-widths">
+ <xsl:with-param name="cols-count" select="$cols-count"/>
+ <xsl:with-param name="table" select="$simple-table"/>
+ </xsl:call-template>
+ </xsl:if>
</xsl:variable>
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
<!-- <xsl:variable name="colwidths2">
<xsl:call-template name="calculate-column-widths">
@@ -1399,20 +1401,29 @@
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
<xsl:if test="$isNoteOrFnExist = 'true'">
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
</xsl:if>
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
- <xsl:choose>
- <xsl:when test=". = 1 or . = 0">
- <fo:table-column column-width="proportional-column-width(2)"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-column column-width="proportional-column-width({.})"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
+ <fo:table-column column-width="{@width}"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
+ <xsl:choose>
+ <xsl:when test=". = 1 or . = 0">
+ <fo:table-column column-width="proportional-column-width(2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:table-column column-width="proportional-column-width({.})"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
<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>
@@ -1421,14 +1432,16 @@
</xsl:otherwise>
</xsl:choose>
</fo:table>
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
<xsl:call-template name="insertTableFooterInSeparateTable">
<xsl:with-param name="table_attributes" select="$table_attributes"/>
<xsl:with-param name="colwidths" select="$colwidths"/>
+ <xsl:with-param name="colgroup" select="$colgroup"/>
</xsl:call-template>
</xsl:for-each>
<!-- insert footer as table -->
<!-- <fo:table>
@@ -1678,16 +1691,26 @@
</xsl:if>
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
<xsl:param name="table_attributes"/>
<xsl:param name="colwidths"/>
+ <xsl:param name="colgroup"/>
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
<xsl:if test="$isNoteOrFnExist = 'true'">
- <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
+ <xsl:variable name="cols-count">
+ <xsl:choose>
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<fo:table keep-with-previous="always">
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
<xsl:choose>
<xsl:when test="@name = 'border-top'">
@@ -1701,20 +1724,29 @@
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
- <xsl:choose>
- <xsl:when test=". = 1 or . = 0">
- <fo:table-column column-width="proportional-column-width(2)"/>
- </xsl:when>
- <xsl:otherwise>
- <fo:table-column column-width="proportional-column-width({.})"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
+ <xsl:choose>
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
+ <fo:table-column column-width="{@width}"/>
+ </xsl:for-each>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
+ <xsl:choose>
+ <xsl:when test=". = 1 or . = 0">
+ <fo:table-column column-width="proportional-column-width(2)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:table-column column-width="proportional-column-width({.})"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </xsl:otherwise>
+ </xsl:choose>
<fo:table-body>
<fo:table-row>
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
@@ -3881,11 +3913,12 @@
<fo:table-column column-width="20mm"/>
<fo:table-column column-width="23mm"/>
<fo:table-column column-width="107mm"/>
<fo:table-column column-width="15mm"/>
<fo:table-body>
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
</fo:table-row>
@@ -3899,9 +3932,13 @@
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
<fo:block><xsl:apply-templates/></fo:block>
</fo:table-cell>
</xsl:template><xsl:template name="processBibitem">
+
+
+ <!-- end BIPM bibitem processing-->
+
</xsl:template><xsl:template name="processBibitemDocId">
\ No newline at end of file