Skip to content

Commit

Permalink
BIPM xslt updated for metanorma/bipm-si-brochure#28 fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Oct 16, 2020
1 parent 6b5f8e7 commit b4ac8de
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
21 changes: 12 additions & 9 deletions xslt_src/bipm.brochure.presentation.core.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@
<xsl:choose>
<xsl:when test="$level = 1 and (parent::bipm:annex or parent::bipm:abstract or ancestor::bipm:preface)">84pt</xsl:when>
<xsl:when test="$level = 1">6pt</xsl:when>
<xsl:when test="$level = 2 and ancestor::bipm:annex">12pt</xsl:when> <!-- 6pt -->
<xsl:when test="$level = 2 and ancestor::bipm:annex">6pt</xsl:when> <!-- 6pt 12pt -->
<!-- <xsl:when test="$level = 2 and $independentAppendix != ''">6pt</xsl:when> -->
<xsl:when test="$level = 2">10pt</xsl:when>
<xsl:otherwise>6pt</xsl:otherwise>
Expand Down Expand Up @@ -1707,8 +1707,8 @@
<xsl:variable name="space-before"> <!-- margin-top for title, see bipm:title -->
<xsl:if test="local-name(*[1]) = 'title'">
<xsl:if test="*[1]/@depth = 2">24pt</xsl:if>
<xsl:if test="*[1]/@level = 3 and not(*[1]/ancestor::bipm:annex)">20pt</xsl:if>
<xsl:if test="*[1]/@level &gt;= 3 and *[1]/ancestor::bipm:annex">12pt</xsl:if> <!-- 6pt-->
<xsl:if test="*[1]/@depth = 3 and not(*[1]/ancestor::bipm:annex)">20pt</xsl:if>
<xsl:if test="*[1]/@depth &gt;= 3 and *[1]/ancestor::bipm:annex">6pt</xsl:if> <!-- 6pt-->
</xsl:if>
</xsl:variable>
<xsl:variable name="space-before-value" select="normalize-space($space-before)"/>
Expand Down Expand Up @@ -1931,18 +1931,21 @@
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:if>


<xsl:variable name="start_row_next" select="normalize-space(xalan:nodeset($rows)/num[$curr_row_num + 1]/@span_start)" />
<xsl:variable name="start_row_next_num" select="number($start_row_next)"/>
<!-- start_row_next=<xsl:value-of select="$start_row_next"/>
local-name=<xsl:value-of select="local-name(*[$start_row_next])"/> -->
local-name=<xsl:value-of select="local-name(*[$start_row_next_num])"/>
level=<xsl:value-of select="*[$start_row_next_num]/@depth"/> -->
<xsl:variable name="table-row-padding-bottom">
<xsl:variable name="start_row_next" select="normalize-space(xalan:nodeset($rows)/num[$curr_row_num + 1]/@span_start)" />
<xsl:if test="$start_row_next != '' and local-name(*[$start_row_next]) = 'title'">
<xsl:variable name="start_row_next_num" select="number($start_row_next)"/>
<xsl:if test="$start_row_next != '' and local-name(*[$start_row_next_num]) = 'title'">
<xsl:if test="*[$start_row_next_num]/@depth = 2">24pt</xsl:if>
<!-- <xsl:attribute name="padding-bottom">20pt</xsl:attribute> -->
<xsl:if test="*[$start_row_next_num]/@level = 3 and not(*[$start_row_next_num]/ancestor::bipm:annex)">20pt</xsl:if>
<xsl:if test="*[$start_row_next_num]/@level &gt;= 3 and *[$start_row_next_num]/ancestor::bipm:annex">12pt</xsl:if> <!-- 6pt -->
<xsl:if test="*[$start_row_next_num]/@depth = 3 and not(*[$start_row_next_num]/ancestor::bipm:annex)">20pt</xsl:if>
<xsl:if test="*[$start_row_next_num]/@depth &gt;= 3 and *[$start_row_next_num]/ancestor::bipm:annex">6pt</xsl:if> <!-- 6pt -->
</xsl:if>
</xsl:variable>
<!-- table-row-padding-bottom=<xsl:value-of select="$table-row-padding-bottom"/> -->
<xsl:variable name="table-row-padding-bottom-value" select="normalize-space($table-row-padding-bottom)"/>
<!-- padding-bottom-value=<xsl:value-of select="$padding-bottom-value"/> -->
<fo:table-cell>
Expand Down
5 changes: 5 additions & 0 deletions xslt_src/common.presentation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,11 @@
</xsl:if>
</xsl:if>
</xsl:if>
<xsl:if test="$namespace = 'bipm'">
<xsl:if test="count(*) = 1 and local-name(*[1]) = 'th'">
<xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
</xsl:if>
</xsl:if>
<!-- <xsl:if test="$namespace = 'bipm'">
<xsl:attribute name="height">8mm</xsl:attribute>
</xsl:if> -->
Expand Down

0 comments on commit b4ac8de

Please sign in to comment.