lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.6.3 vs lib/isodoc/iho/iho.specification.xsl in metanorma-iho-0.6.4
- old
+ new
@@ -1106,12 +1106,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">
@@ -1213,10 +1216,11 @@
<xsl:attribute name="padding-right">5mm</xsl:attribute>
+
</xsl:attribute-set><xsl:variable name="table-border_">
@@ -1550,11 +1554,12 @@
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
-
+
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
@@ -1566,10 +1571,11 @@
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
<xsl:attribute name="margin-top">8pt</xsl:attribute>
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
@@ -2019,12 +2025,15 @@
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
+ <!-- <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 name="line-height">115%</xsl:attribute>
@@ -3205,87 +3214,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>
@@ -3572,10 +3589,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>
@@ -3593,12 +3611,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>
@@ -5283,10 +5305,12 @@
+
+
<xsl:choose>
<xsl:when test="$target_text = ''">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
@@ -5494,10 +5518,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>
@@ -5516,10 +5541,11 @@
<xsl:value-of select="$sfx"/>
</xsl:when>
<xsl:otherwise>
+
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="normalize-space() != ''">
<xsl:apply-templates/>
@@ -5533,10 +5559,11 @@
<xsl:value-of select="$sfx"/>
</xsl:when>
<xsl:otherwise>
+
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="normalize-space() != ''">
<xsl:apply-templates/>
@@ -6308,10 +6335,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>
@@ -6368,11 +6398,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>
@@ -6444,10 +6474,13 @@
10
<!-- 9 -->
+ <!-- <xsl:if test="$namespace = 'ieee'">
+ <xsl:if test="$doctype = 'standard' and $stage = 'published'">8</xsl:if>
+ </xsl:if> -->
@@ -6888,14 +6921,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>
@@ -6999,10 +7036,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>
@@ -7155,10 +7193,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'">
@@ -7570,10 +7610,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>
@@ -7844,11 +7886,11 @@
</fo:list-item-body>
</fo:list-item>
</fo:list-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">
<xsl:call-template name="bibitem"/>
@@ -8572,10 +8614,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