Skip to content

Commit

Permalink
common.xslt updated for IEC table continued, metanorma/metanorma-iec#199
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Apr 2, 2023
1 parent d59c9eb commit 2b1f478
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions xslt_src/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1622,7 +1622,8 @@
<xsl:if test="$namespace = 'iec'">
<xsl:attribute name="font-weight">bold</xsl:attribute>
<xsl:attribute name="text-align">center</xsl:attribute>
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
<!-- <xsl:attribute name="margin-bottom">6pt</xsl:attribute> -->
<xsl:attribute name="margin-bottom">-12pt</xsl:attribute>
<xsl:attribute name="space-before">12pt</xsl:attribute>
</xsl:if>
<xsl:if test="$namespace = 'ieee'">
Expand Down Expand Up @@ -5825,6 +5826,13 @@
</xsl:if>
</xsl:if>

<xsl:if test="$namespace = 'iec'">
<xsl:if test="$continued = 'true'">
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
</xsl:if>
</xsl:if>

<xsl:if test="$namespace = 'iso'">
<xsl:if test="$continued = 'true'">
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
Expand Down Expand Up @@ -5859,7 +5867,7 @@
</xsl:if>
</xsl:if>

<xsl:if test="$namespace = 'iso'">
<xsl:if test="$namespace = 'iec' or $namespace = 'iso'">
<xsl:if test="$continued = 'true'">
<fo:inline font-weight="bold" font-style="normal">
<fo:retrieve-table-marker retrieve-class-name="table_number"/>
Expand Down Expand Up @@ -6240,7 +6248,7 @@
<xsl:template match="*[local-name()='thead']">
<xsl:param name="cols-count"/>
<fo:table-header>
<xsl:if test="$namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<xsl:if test="$namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<xsl:call-template name="table-header-title">
<xsl:with-param name="cols-count" select="$cols-count"/>
</xsl:call-template>
Expand All @@ -6256,7 +6264,7 @@
</fo:table-header>
</xsl:template> <!-- thead -->

<!-- template is using for iso, jcgm, bsi only -->
<!-- template is using for iec, iso, jcgm, bsi only -->
<xsl:template name="table-header-title">
<xsl:param name="cols-count"/>
<!-- row for title -->
Expand All @@ -6269,6 +6277,13 @@
<xsl:attribute name="border-top">none</xsl:attribute>
</xsl:if>

<xsl:if test="$namespace = 'iec'">
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
<xsl:attribute name="border-bottom">none</xsl:attribute>
</xsl:if>

<xsl:if test="$namespace = 'iso'">
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
Expand Down Expand Up @@ -6569,7 +6584,7 @@
</xsl:choose>
</xsl:variable>

<xsl:if test="$namespace = 'bsi' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<!-- if there isn't 'thead' and there is a table's title -->
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
<fo:table-header>
Expand All @@ -6589,15 +6604,15 @@
</xsl:call-template>

<fo:table-body>
<xsl:if test="$namespace = 'bsi' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'">
<xsl:variable name="title_continued_">
<xsl:call-template name="getTitle">
<xsl:with-param name="name" select="'title-continued'"/>
</xsl:call-template>
</xsl:variable>

<xsl:variable name="title_continued">
<xsl:if test="$namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'"><xsl:value-of select="$title_continued_"/></xsl:if>
<xsl:if test="$namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm'"><xsl:value-of select="$title_continued_"/></xsl:if>
<xsl:if test="$namespace = 'bsi'">
<xsl:choose>
<xsl:when test="$document_type = 'PAS'">— <xsl:value-of select="translate($title_continued_, '()', '')"/></xsl:when>
Expand All @@ -6612,7 +6627,7 @@
<fo:table-row height="0" keep-with-next.within-page="always">
<fo:table-cell>

<xsl:if test="$namespace = 'bsi' or $namespace = 'iso'">
<xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'">
<fo:marker marker-class-name="table_number" />
<fo:marker marker-class-name="table_continued" />
</xsl:if>
Expand All @@ -6629,7 +6644,7 @@
<xsl:if test="$namespace = 'bsi'">
<fo:marker marker-class-name="table_number"><xsl:value-of select="$table_number"/></fo:marker>
</xsl:if>
<xsl:if test="$namespace = 'iso'">
<xsl:if test="$namespace = 'iec' or $namespace = 'iso'">
<fo:marker marker-class-name="table_number"><xsl:value-of select="normalize-space(translate($table_number, '&#xa0;', ' '))"/></fo:marker>
</xsl:if>
<fo:marker marker-class-name="table_continued">
Expand Down

0 comments on commit 2b1f478

Please sign in to comment.