lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.9.7 vs lib/isodoc/un/un.plenary-attachment.xsl in metanorma-un-0.9.8
- old
+ new
@@ -772,12 +772,22 @@
</xsl:variable>
<xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/>
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">
+ true
+ </xsl:variable>
+ <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
+
<xsl:variable name="isGenerateTableIF_">
- false
+ <xsl:choose>
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
+ <xsl:value-of select="normalize-space($table_if) = 'true'"/>
+ </xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
</xsl:variable>
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
<xsl:variable name="lang">
<xsl:call-template name="getLang"/>
@@ -1389,11 +1399,11 @@
<xsl:attribute-set name="dt-cell-style">
</xsl:attribute-set>
<xsl:attribute-set name="dt-block-style">
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="dl-name-style">
<xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -2333,10 +2343,11 @@
colwidths=<xsl:copy-of select="$colwidths"/>
<xsl:text disable-output-escaping="yes">- -></xsl:text> -->
<xsl:variable name="margin-side">
<xsl:choose>
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
@@ -2406,10 +2417,11 @@
<p>Description</p>
<word id="tab-symdu_1_2_word_1">Description</word>
</td>
</tr>
-->
+ <!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
</xsl:when>
<xsl:otherwise>
@@ -2537,16 +2549,21 @@
</xsl:template>
<xsl:template name="calculate-column-widths">
<xsl:param name="table"/>
<xsl:param name="cols-count"/>
-
+ <xsl:choose>
+ <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
+ <xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
+ </xsl:when>
+ <xsl:otherwise>
<xsl:call-template name="calculate-column-widths-proportional">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$table"/>
</xsl:call-template>
-
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- ================================================== -->
<!-- Calculate column's width based on text string max widths -->
<!-- ================================================== -->
@@ -2720,10 +2737,11 @@
<!-- ================================================== -->
<!-- Calculate column's width based on HTML4 algorithm -->
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
<!-- ================================================== -->
+ <!-- INPUT: table with columns widths, generated by table_if.xsl -->
<xsl:template name="calculate-column-widths-autolayout-algorithm">
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
<!-- via intermediate format -->
@@ -2731,71 +2749,10 @@
<!-- In the first pass, line wrapping is disabled, and the user agent keeps track of the minimum and maximum width of each cell. -->
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
- <!-- get current table id -->
- <xsl:variable name="table_id" select="@id"/>
- <!-- find table by id in the file 'table_widths' -->
- <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
-
- <!-- table='<xsl:copy-of select="$table"/>' -->
- <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
- <!-- table-if='<xsl:copy-of select="$table-if"/>' -->
- <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
-
- <xsl:variable name="table_with_cell_widths_">
- <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
- </xsl:variable>
- <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
-
- <!-- <xsl:if test="$table_if_debug = 'true'">
- <xsl:copy-of select="$table_with_cell_widths"/>
- </xsl:if> -->
-
- <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
-
- <xsl:variable name="column_widths_">
- <!-- iteration of columns -->
- <xsl:for-each select="$table_with_cell_widths//tr[1]/td">
- <xsl:variable name="pos" select="position()"/>
- <column>
- <xsl:attribute name="width_max">
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
- <xsl:sort select="." data-type="number" order="descending"/>
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- <xsl:attribute name="width_min">
- <xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
- <xsl:sort select="." data-type="number" order="descending"/>
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
- </xsl:for-each>
- </xsl:attribute>
- </column>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
-
- <!-- <column_widths>
- <xsl:copy-of select="$column_widths"/>
- </column_widths> -->
-
- <!-- These in turn, are used to find the minimum and maximum width for the table. -->
- <xsl:variable name="table_widths_">
- <table>
- <xsl:attribute name="width_max">
- <xsl:value-of select="sum($column_widths/column/@width_max)"/>
- </xsl:attribute>
- <xsl:attribute name="width_min">
- <xsl:value-of select="sum($column_widths/column/@width_min)"/>
- </xsl:attribute>
- </table>
- </xsl:variable>
- <xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
-
<xsl:variable name="page_width">
<xsl:choose>
<xsl:when test="$parent_table_page-width != ''">
<xsl:value-of select="$parent_table_page-width"/>
</xsl:when>
@@ -2804,55 +2761,52 @@
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$table_if_debug = 'true'">
- <table_width>
- <xsl:copy-of select="$table_widths"/>
- </table_width>
- <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
+ <page_width><xsl:value-of select="$page_width"/></page_width>
</xsl:if>
<!-- There are three cases: -->
<xsl:choose>
<!-- 1. The minimum table width is equal to or wider than the available space -->
- <xsl:when test="$table_widths/table/@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
+ <xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
<!-- call old algorithm -->
<case1/>
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
<xsl:call-template name="calculate-column-widths-proportional">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$table"/>
</xsl:call-template> -->
</xsl:when>
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
- <xsl:when test="$table_widths/table/@width_max <= $page_width">
+ <xsl:when test="@width_max <= $page_width">
<case2/>
<autolayout/>
- <xsl:for-each select="$column_widths/column/@width_max">
+ <xsl:for-each select="column/@width_max">
<column divider="100"><xsl:value-of select="."/></column>
</xsl:for-each>
</xsl:when>
<!-- 3. The maximum width of the table is greater than the available space, but the minimum table width is smaller.
In this case, find the difference between the available space and the minimum table width, lets call it W.
Lets also call D the difference between maximum and minimum width of the table.
For each column, let d be the difference between maximum and minimum width of that column.
Now set the column's width to the minimum width plus d times W over D.
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
- <xsl:when test="($table_widths/table/@width_max > $page_width and $table_widths/table/@width_min < $page_width) or ($table_widths/table/@width_min >= $page_width)">
+ <xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
<!-- difference between the available space and the minimum table width -->
- <xsl:variable name="W" select="$page_width - $table_widths/table/@width_min"/>
+ <xsl:variable name="W" select="$page_width - @width_min"/>
<W><xsl:value-of select="$W"/></W>
<!-- difference between maximum and minimum width of the table -->
- <xsl:variable name="D" select="$table_widths/table/@width_max - $table_widths/table/@width_min"/>
+ <xsl:variable name="D" select="@width_max - @width_min"/>
<D><xsl:value-of select="$D"/></D>
<case3/>
<autolayout/>
- <xsl:if test="$table_widths/table/@width_min >= $page_width">
+ <xsl:if test="@width_min >= $page_width">
<split_keep-within-line>true</split_keep-within-line>
</xsl:if>
- <xsl:for-each select="$column_widths/column">
+ <xsl:for-each select="column">
<!-- difference between maximum and minimum width of that column. -->
<xsl:variable name="d" select="@width_max - @width_min"/>
<d><xsl:value-of select="$d"/></d>
<width_min><xsl:value-of select="@width_min"/></width_min>
<e><xsl:value-of select="$d * $W div $D"/></e>
@@ -2874,27 +2828,43 @@
<xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
<parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
+ <ancestor_tree>
+ <xsl:for-each select="ancestor::*">
+ <ancestor><xsl:value-of select="local-name()"/></ancestor>
+ </xsl:for-each>
+ </ancestor_tree>
+
<xsl:variable name="parent_table_page-width_">
<xsl:if test="$parent_table_id != ''">
<!-- determine column number in the parent table -->
<xsl:variable name="parent_table_column_number">
<xsl:choose>
- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
+ <!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
+ <xsl:when test="(ancestor::*[local-name() = 'dd' or local-name() = 'table' or local-name() = 'dl'])[last()][local-name() = 'dd' or local-name() = 'dl']">2</xsl:when>
<xsl:otherwise> <!-- parent is table -->
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
- <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
+
+ <xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
+ <xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
+ <!-- <xsl:variable name="divider">
+ <xsl:value-of select="$parent_table_column/@divider"/>
+ <xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
+ </xsl:variable> -->
+ <xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
</xsl:if>
</xsl:variable>
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
+ <parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
+
<!-- get current table id -->
<xsl:variable name="table_id" select="@id"/>
<xsl:choose>
<xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
@@ -2911,54 +2881,10 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
- <!-- ============================= -->
- <!-- mode: determine_cell_widths-if -->
- <!-- ============================= -->
- <xsl:template match="@*|node()" mode="determine_cell_widths-if">
- <xsl:copy>
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
- </xsl:copy>
- </xsl:template>
-
- <xsl:template match="td | th" mode="determine_cell_widths-if">
- <xsl:copy>
- <xsl:copy-of select="@*"/>
-
- <!-- The maximum width is given by the widest line. -->
- <xsl:attribute name="width_max">
- <xsl:for-each select="p_len">
- <xsl:sort select="." data-type="number" order="descending"/>
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
- </xsl:for-each>
- </xsl:attribute>
-
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
- <xsl:variable name="width_min">
- <xsl:for-each select="word_len">
- <xsl:sort select="." data-type="number" order="descending"/>
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
- </xsl:for-each>
- </xsl:variable>
- <xsl:attribute name="width_min">
- <xsl:value-of select="$width_min"/>
- </xsl:attribute>
-
- <xsl:if test="$width_min = 0">
- <xsl:attribute name="width_min">1</xsl:attribute>
- </xsl:if>
-
- <xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
-
- </xsl:copy>
- </xsl:template>
- <!-- ============================= -->
- <!-- END mode: determine_cell_widths-if -->
- <!-- ============================= -->
-
<!-- ================================================== -->
<!-- Calculate column's width based on HTML4 algorithm -->
<!-- ================================================== -->
<xsl:template match="*[local-name()='thead']">
@@ -3145,10 +3071,11 @@
<xsl:choose>
<xsl:when test="$table_or_dl = 'table'">
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
<fo:table-row number-columns-spanned="{$col_count}">
+ <xsl:copy-of select="../@font-weight"/>
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
<xsl:call-template name="td"/>
</fo:table-row>
</xsl:for-each>
</xsl:when>
@@ -3295,11 +3222,11 @@
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
- <xsl:if test="$isGenerateTableIF = 'true'"><fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
+ <xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
</fo:block>
</fo:table-cell>
</xsl:template> <!-- td -->
@@ -3625,10 +3552,11 @@
<!-- Definition List -->
<!-- ===================== -->
<xsl:template match="*[local-name()='dl']">
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
+ <!-- <dl><xsl:copy-of select="."/></dl> -->
<fo:block-container>
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
<xsl:attribute name="margin-left">0mm</xsl:attribute>
</xsl:if>
@@ -4158,25 +4086,20 @@
</xsl:template>
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
<xsl:template match="*[local-name()='dt']" mode="dl_if">
<xsl:param name="id"/>
- <xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
<tr>
<td>
<xsl:copy-of select="node()"/>
</td>
<td>
-
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
-
- <!-- get paragraphs from nested 'dl' -->
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
-
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
+ <!-- get paragraphs from nested 'dl' -->
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
</td>
</tr>
-
</xsl:template>
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
<xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
<xsl:for-each select="*[local-name() = 'dt']">
@@ -4823,10 +4746,13 @@
<xsl:choose>
<xsl:when test="@colspan">
<xsl:variable name="td">
<xsl:element name="td">
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
+ <xsl:if test="local-name()='th'">
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:if>
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
<xsl:apply-templates mode="simple-table-colspan"/>
</xsl:element>
</xsl:variable>
<xsl:call-template name="repeatNode">
@@ -4835,10 +4761,13 @@
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:element name="td">
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
+ <xsl:if test="local-name()='th'">
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+ </xsl:if>
<xsl:apply-templates mode="simple-table-colspan"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
@@ -4964,23 +4893,31 @@
<xsl:param name="id"/>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
+ <xsl:variable name="divide">
+ <xsl:choose>
+ <xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
+ <xsl:otherwise>1</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:attribute name="id">
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
</xsl:attribute>
<xsl:for-each select="*[local-name() = 'p']">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
<xsl:attribute name="id">
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
</xsl:attribute>
- <xsl:copy-of select="node()"/>
+ <!-- <xsl:copy-of select="node()" /> -->
+ <xsl:apply-templates mode="simple-table-noid"/>
+
</xsl:copy>
</xsl:for-each>
<xsl:if test="$isGenerateTableIF = 'true'"> <!-- split each paragraph to words, image, math -->
@@ -5005,29 +4942,47 @@
<xsl:for-each select="xalan:nodeset($words)/word">
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
<xsl:copy>
<xsl:attribute name="id">
- <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
+ <xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
</xsl:attribute>
<xsl:copy-of select="node()"/>
</xsl:copy>
</xsl:for-each>
</xsl:if>
</xsl:copy>
</xsl:template>
+
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
+ <xsl:copy>
+ <xsl:choose>
+ <xsl:when test="$isGenerateTableIF = 'true'">
+ <xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
+ <!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
+ <xsl:copy-of select="@id"/>
+ </xsl:if> -->
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="@*"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:apply-templates select="node()" mode="simple-table-noid"/>
+ </xsl:copy>
+ </xsl:template>
+
<!-- End mode: simple-table-id -->
<!-- ===================== -->
<!-- ===================== -->
<!-- =============================== -->
<!-- mode="td_text_with_formatting" -->
<!-- =============================== -->
<xsl:template match="@*|node()" mode="td_text_with_formatting">
<xsl:copy>
- <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
+ <xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*[local-name() = 'stem' or local-name() = 'image']" mode="td_text_with_formatting"/>
@@ -5137,10 +5092,14 @@
<xsl:variable name="isAdded" select="@added"/>
<xsl:variable name="isDeleted" select="@deleted"/>
<fo:inline xsl:use-attribute-sets="mathml-style">
+ <xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
+ <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
+ </xsl:if>
+
<xsl:call-template name="setTrackChangesStyles">
<xsl:with-param name="isAdded" select="$isAdded"/>
<xsl:with-param name="isDeleted" select="$isDeleted"/>
</xsl:call-template>
@@ -7126,19 +7085,16 @@
</fo:table-body>
</xsl:template>
<xsl:template match="*[local-name()='tr']" mode="requirement">
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
+
+ <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
+
</xsl:if>
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
- </xsl:if>
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
- </xsl:if>
+
<xsl:apply-templates mode="requirement"/>
</fo:table-row>
</xsl:template>
<xsl:template match="*[local-name()='th']" mode="requirement">
@@ -8612,10 +8568,10 @@
<tbody>
<xsl:apply-templates mode="toc_table_width"/>
</tbody>
</xsl:variable>
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
- <xsl:call-template name="calculate-column-widths">
+ <xsl:call-template name="calculate-column-widths-proportional">
<xsl:with-param name="cols-count" select="$cols-count"/>
<xsl:with-param name="table" select="$toc_table_simple"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
\ No newline at end of file