lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.1.3 vs lib/isodoc/cc/cc.standard.xsl in metanorma-cc-2.1.4
- old
+ new
@@ -894,12 +894,15 @@
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
</xsl:attribute-set><xsl:attribute-set name="subject-style">
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
</xsl:attribute-set><xsl:attribute-set name="description-style">
@@ -998,10 +1001,11 @@
<xsl:attribute name="padding-right">10mm</xsl:attribute>
+
</xsl:attribute-set><xsl:variable name="table-border_">
@@ -1335,26 +1339,28 @@
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
-
+
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
+
@@ -1782,18 +1788,21 @@
+ <!-- <xsl:if test="$namespace = 'ieee'">
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
+ <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
+ </xsl:if> -->
-
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
@@ -2969,87 +2978,95 @@
<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)/table_attributes/@*">
- <xsl:variable name="name" select="local-name()"/>
+
+ <xsl:variable name="tableWithNotesAndFootnotes">
+
+ <fo:table keep-with-previous="always">
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
+ <xsl:variable name="name" select="local-name()"/>
+ <xsl:choose>
+ <xsl:when test="$name = 'border-top'">
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
+ </xsl:when>
+ <xsl:when test="$name = 'border'">
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+
+
+
<xsl:choose>
- <xsl:when test="$name = 'border-top'">
- <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
+ <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:when test="$name = 'border'">
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
- </xsl:when>
<xsl:otherwise>
- <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
+ <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
+ <xsl:call-template name="insertTableColumnWidth">
+ <xsl:with-param name="colwidths" select="$colwidths"/>
+ </xsl:call-template>
</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>
- <!-- $colwidths=<xsl:copy-of select="$colwidths"/> -->
- <xsl:call-template name="insertTableColumnWidth">
- <xsl:with-param name="colwidths" select="$colwidths"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
-
- <fo:table-body>
- <fo:table-row>
- <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
-
-
+
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
+
+
-
-
- <!-- fn will be processed inside 'note' processing -->
-
-
-
-
-
-
- <!-- for BSI (not PAS) display Notes before footnotes -->
-
-
- <!-- except gb and bsi -->
-
- <xsl:apply-templates select="../*[local-name()='note']"/>
-
-
- <!-- horizontal row separator -->
-
-
- <!-- fn processing -->
-
- <xsl:call-template name="table_fn_display"/>
-
-
- <!-- for PAS display Notes after footnotes -->
-
-
- </fo:table-cell>
- </fo:table-row>
- </fo:table-body>
-
- </fo:table>
+ <!-- fn will be processed inside 'note' processing -->
+
+
+
+
+
+
+ <!-- for BSI (not PAS) display Notes before footnotes -->
+
+
+ <!-- except gb and bsi -->
+
+ <xsl:apply-templates select="../*[local-name()='note']"/>
+
+
+
+ <!-- horizontal row separator -->
+
+
+ <!-- fn processing -->
+
+ <xsl:call-template name="table_fn_display"/>
+
+
+
+ <!-- for PAS display Notes after footnotes -->
+
+
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+
+ </fo:table>
+ </xsl:variable>
+ <xsl:if test="normalize-space($tableWithNotesAndFootnotes) != ''">
+ <xsl:copy-of select="$tableWithNotesAndFootnotes"/>
+ </xsl:if>
+
</xsl:if>
</xsl:template><xsl:template match="*[local-name()='tbody']">
<xsl:variable name="cols-count">
<xsl:choose>
@@ -3336,10 +3353,11 @@
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
<xsl:variable name="footnote_inline">
<fo:inline xsl:use-attribute-sets="fn-num-style">
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
<xsl:value-of select="$current_fn_number_text"/>
</fo:basic-link>
</fo:inline>
</xsl:variable>
@@ -3357,12 +3375,16 @@
<fo:block-container xsl:use-attribute-sets="fn-container-body-style">
<fo:block xsl:use-attribute-sets="fn-body-style">
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
+
+
+
<xsl:value-of select="$current_fn_number_text"/>
</fo:inline>
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
@@ -5043,10 +5065,12 @@
+
+
<xsl:choose>
<xsl:when test="$target_text = ''">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
@@ -5250,10 +5274,11 @@
</xsl:if>
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
<xsl:call-template name="append_add-style"/>
</xsl:if>
@@ -5272,10 +5297,11 @@
<xsl:value-of select="$sfx"/>
</xsl:when>
<xsl:otherwise>
+
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="normalize-space() != ''">
<xsl:apply-templates/>
@@ -5289,10 +5315,11 @@
<xsl:value-of select="$sfx"/>
</xsl:when>
<xsl:otherwise>
+
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="normalize-space() != ''">
<xsl:apply-templates/>
@@ -6064,10 +6091,13 @@
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
<xsl:if test="normalize-space() != ''">
<fo:block xsl:use-attribute-sets="figure-name-style">
+
+
+
<xsl:apply-templates/>
</fo:block>
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
<xsl:param name="mode">bookmarks</xsl:param>
@@ -6124,11 +6154,11 @@
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref']" mode="contents">
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'xref'] | *[local-name() = 'eref']" mode="contents">
<xsl:value-of select="."/>
</xsl:template><xsl:template match="*[local-name() = 'review']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
<xsl:text> </xsl:text>
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
<xsl:copy>
@@ -6200,10 +6230,13 @@
<!-- 9 -->
+ <!-- <xsl:if test="$namespace = 'ieee'">
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
+ </xsl:if> -->
@@ -6644,14 +6677,18 @@
</fo:inline>
</xsl:if>
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
<xsl:variable name="element">inline
+
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($element, 'block')">
<fo:block xsl:use-attribute-sets="example-p-style">
+
+
+
<xsl:apply-templates/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:inline><xsl:apply-templates/></fo:inline>
@@ -6755,10 +6792,11 @@
<xsl:attribute name="margin-left">0mm</xsl:attribute>
<xsl:attribute name="margin-right">0mm</xsl:attribute>
</xsl:if>
<fo:block xsl:use-attribute-sets="example-p-style">
+
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
</xsl:when>
<xsl:otherwise>
@@ -6911,10 +6949,12 @@
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
<xsl:variable name="text" select="normalize-space()"/>
+
+
<fo:basic-link fox:alt-text="{@citeas}">
<xsl:if test="normalize-space(@citeas) = ''">
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
</xsl:if>
<xsl:if test="@type = 'inline'">
@@ -7340,10 +7380,12 @@
<fo:list-item-label end-indent="label-end()">
<fo:block xsl:use-attribute-sets="list-item-label-style">
+
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
<xsl:call-template name="append_add-style"/>
</xsl:if>
@@ -7597,11 +7639,11 @@
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
<xsl:call-template name="processBibitem"/>
</fo:block>
- </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
@@ -7610,13 +7652,11 @@
<fo:block>
<fo:inline>
<xsl:value-of select="*[local-name()='docidentifier'][@type = 'metanorma-ordinal']"/>
<xsl:if test="not(*[local-name()='docidentifier'][@type = 'metanorma-ordinal'])">
-
- <xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
-
+ <xsl:number format="[1]" count="*[local-name()='bibitem'][not(@hidden = 'true')]"/>
</xsl:if>
</fo:inline>
</fo:block>
</fo:list-item-label>
@@ -8384,10 +8424,10 @@
</xsl:for-each>
</dc:creator>
<dc:description>
<xsl:variable name="abstract">
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'title'])]"/>
</xsl:variable>
<xsl:value-of select="normalize-space($abstract)"/>
</dc:description>
<pdf:Keywords>
\ No newline at end of file