metanorma-ieee 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ieee/ieee.amendment.xsl +478 -221
- data/lib/isodoc/ieee/ieee.standard.xsl +478 -221
- data/lib/isodoc/ieee/presentation_ref.rb +14 -7
- data/lib/isodoc/ieee/word_convert.rb +20 -14
- data/lib/isodoc/ieee/word_wp_convert.rb +1 -1
- data/lib/metanorma/ieee/basicdoc.rng +37 -32
- data/lib/metanorma/ieee/isodoc.rng +32 -17
- data/lib/metanorma/ieee/version.rb +1 -1
- metadata +2 -2
@@ -2182,21 +2182,9 @@
|
|
2182
2182
|
</xsl:variable>
|
2183
2183
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2184
2184
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2185
|
-
<xsl:variable name="lang" select="ancestor::*[local-name() = 'metanorma']/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2186
|
-
<xsl:variable name="reference_">
|
2187
|
-
<xsl:value-of select="@reference"/>
|
2188
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
2189
|
-
</xsl:variable>
|
2190
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
2191
|
-
<!-- fn sequence number in document -->
|
2192
|
-
<xsl:variable name="current_fn_number" select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2193
2185
|
|
2194
2186
|
<xsl:copy>
|
2195
2187
|
<xsl:apply-templates select="@*" mode="flatxml"/>
|
2196
|
-
<!-- put actual reference number -->
|
2197
|
-
<xsl:attribute name="current_fn_number">
|
2198
|
-
<xsl:value-of select="$current_fn_number"/>
|
2199
|
-
</xsl:attribute>
|
2200
2188
|
<xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
|
2201
2189
|
<xsl:value-of select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
|
2202
2190
|
</xsl:attribute>
|
@@ -2745,7 +2733,7 @@
|
|
2745
2733
|
<xsl:call-template name="fn"/>
|
2746
2734
|
</xsl:template>
|
2747
2735
|
|
2748
|
-
<xsl:template match="ieee:p/ieee:fn/ieee:p" priority="2">
|
2736
|
+
<xsl:template match="ieee:p/ieee:fn/ieee:p | *[local-name() = 'fmt-fn-body']//*[local-name()='p']" priority="2">
|
2749
2737
|
<xsl:choose>
|
2750
2738
|
<xsl:when test="preceding-sibling::ieee:p"> <!-- for multi-paragraphs footnotes -->
|
2751
2739
|
<fo:block>
|
@@ -2754,7 +2742,9 @@
|
|
2754
2742
|
</fo:block>
|
2755
2743
|
</xsl:when>
|
2756
2744
|
<xsl:otherwise>
|
2757
|
-
<
|
2745
|
+
<fo:inline role="P">
|
2746
|
+
<xsl:apply-templates/>
|
2747
|
+
</fo:inline>
|
2758
2748
|
</xsl:otherwise>
|
2759
2749
|
</xsl:choose>
|
2760
2750
|
</xsl:template>
|
@@ -4675,15 +4665,19 @@
|
|
4675
4665
|
</xsl:template>
|
4676
4666
|
|
4677
4667
|
<xsl:attribute-set name="table-fn-number-style">
|
4668
|
+
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
4669
|
+
|
4670
|
+
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4671
|
+
|
4672
|
+
<xsl:attribute-set name="table-fmt-fn-label-style">
|
4678
4673
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4679
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
4680
4674
|
|
4681
4675
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4682
4676
|
<xsl:attribute name="font-size">6.5pt</xsl:attribute>
|
4683
4677
|
|
4684
|
-
</xsl:attribute-set> <!-- table-fn-
|
4678
|
+
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
4685
4679
|
|
4686
|
-
<xsl:template name="refine_table-fn-
|
4680
|
+
<xsl:template name="refine_table-fmt-fn-label-style">
|
4687
4681
|
|
4688
4682
|
</xsl:template>
|
4689
4683
|
|
@@ -4698,11 +4692,18 @@
|
|
4698
4692
|
</xsl:attribute-set>
|
4699
4693
|
|
4700
4694
|
<xsl:attribute-set name="figure-fn-number-style">
|
4701
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4702
4695
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
4696
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
4697
|
+
|
4698
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
4699
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4703
4700
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4704
4701
|
|
4705
|
-
</xsl:attribute-set>
|
4702
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
4703
|
+
|
4704
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
4705
|
+
|
4706
|
+
</xsl:template>
|
4706
4707
|
|
4707
4708
|
<xsl:attribute-set name="figure-fn-body-style">
|
4708
4709
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -5140,6 +5141,9 @@
|
|
5140
5141
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
5141
5142
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
5142
5143
|
|
5144
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
5145
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5146
|
+
|
5143
5147
|
</xsl:attribute-set>
|
5144
5148
|
|
5145
5149
|
<xsl:template name="refine_fn-reference-style">
|
@@ -6233,9 +6237,13 @@
|
|
6233
6237
|
|
6234
6238
|
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
6235
6239
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
6236
|
-
|
6237
|
-
|
6238
|
-
|
6240
|
+
<!-- <xsl:choose>
|
6241
|
+
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
6242
|
+
<xsl:otherwise>
|
6243
|
+
|
6244
|
+
</xsl:otherwise>
|
6245
|
+
</xsl:choose> -->
|
6246
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
6239
6247
|
</xsl:if>
|
6240
6248
|
|
6241
6249
|
<xsl:choose>
|
@@ -6282,7 +6290,7 @@
|
|
6282
6290
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
6283
6291
|
</xsl:when>
|
6284
6292
|
<xsl:otherwise>
|
6285
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
6293
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot') and not(local-name() = 'fmt-footnote-container')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
6286
6294
|
</xsl:otherwise>
|
6287
6295
|
</xsl:choose>
|
6288
6296
|
|
@@ -6293,13 +6301,26 @@
|
|
6293
6301
|
|
6294
6302
|
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
6295
6303
|
|
6296
|
-
|
6297
|
-
|
6298
|
-
|
6299
|
-
|
6300
|
-
|
6301
|
-
|
6302
|
-
|
6304
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
|
6305
|
+
|
6306
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
6307
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
6308
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
6309
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
6310
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
6311
|
+
</xsl:call-template>
|
6312
|
+
</xsl:for-each>
|
6313
|
+
|
6314
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
6315
|
+
<xsl:if test="$namespace = 'plateau'">
|
6316
|
+
<xsl:apply-templates select="*[not(local-name()='thead') and not(local-name()='tbody') and not(local-name()='tfoot') and not(local-name()='name')]" />
|
6317
|
+
<xsl:for-each select="*[local-name()='tbody']"> - select context to tbody -
|
6318
|
+
<xsl:variable name="table_fn_block">
|
6319
|
+
<xsl:call-template name="table_fn_display" />
|
6320
|
+
</xsl:variable>
|
6321
|
+
<xsl:copy-of select="$table_fn_block"/>
|
6322
|
+
</xsl:for-each>
|
6323
|
+
</xsl:if> -->
|
6303
6324
|
|
6304
6325
|
<xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
|
6305
6326
|
<fo:block keep-with-previous="always" line-height="0.1">
|
@@ -6954,6 +6975,7 @@
|
|
6954
6975
|
<xsl:with-param name="key">continued</xsl:with-param>
|
6955
6976
|
</xsl:call-template>
|
6956
6977
|
</xsl:variable>
|
6978
|
+
|
6957
6979
|
<xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
|
6958
6980
|
<xsl:variable name="title_continued">
|
6959
6981
|
<xsl:value-of select="$title_continued_in_parenthesis"/>
|
@@ -7192,6 +7214,17 @@
|
|
7192
7214
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
7193
7215
|
</xsl:if>
|
7194
7216
|
|
7217
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7218
|
+
<xsl:if test="@colspan and *[local-name() = 'note'][@type = 'units']">
|
7219
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
7220
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
7221
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
7222
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
7223
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
7224
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
7225
|
+
</xsl:if>
|
7226
|
+
</xsl:if>
|
7227
|
+
|
7195
7228
|
<fo:block role="SKIP">
|
7196
7229
|
|
7197
7230
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -7210,7 +7243,8 @@
|
|
7210
7243
|
</fo:table-cell>
|
7211
7244
|
</xsl:template> <!-- td -->
|
7212
7245
|
|
7213
|
-
|
7246
|
+
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
7247
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
7214
7248
|
|
7215
7249
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
7216
7250
|
<xsl:copy-of select="@id"/>
|
@@ -7231,65 +7265,54 @@
|
|
7231
7265
|
|
7232
7266
|
</xsl:template> <!-- table/note -->
|
7233
7267
|
|
7234
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
7268
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
7235
7269
|
<xsl:apply-templates/>
|
7236
7270
|
</xsl:template>
|
7237
7271
|
|
7238
7272
|
<!-- ===================== -->
|
7239
7273
|
<!-- Footnotes processing -->
|
7240
7274
|
<!-- ===================== -->
|
7275
|
+
|
7276
|
+
<!-- document text (not figures, or tables) footnotes -->
|
7277
|
+
<xsl:variable name="footnotes_">
|
7278
|
+
<xsl:for-each select="//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']"> <!-- commented *[local-name() = 'metanorma']/, because there are fn in figure or table name -->
|
7279
|
+
<!-- <xsl:copy-of select="."/> -->
|
7280
|
+
<xsl:variable name="update_xml_step1">
|
7281
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
7282
|
+
</xsl:variable>
|
7283
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
7284
|
+
</xsl:for-each>
|
7285
|
+
</xsl:variable>
|
7286
|
+
<xsl:variable name="footnotes" select="xalan:nodeset($footnotes_)"/>
|
7287
|
+
|
7241
7288
|
<!--
|
7242
7289
|
<fn reference="1">
|
7243
7290
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
7244
7291
|
</fn>
|
7245
7292
|
-->
|
7246
|
-
<!-- footnotes in text (title, bibliography, main body, table's, figure's names
|
7293
|
+
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
7294
|
+
<!-- fn in text -->
|
7247
7295
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
7248
7296
|
|
7249
|
-
<!-- list of
|
7297
|
+
<!-- list of unique footnotes -->
|
7250
7298
|
<xsl:variable name="p_fn_">
|
7251
7299
|
<xsl:call-template name="get_fn_list"/>
|
7252
|
-
<!-- <xsl:choose>
|
7253
|
-
<xsl:when test="$namespace = 'jis'">
|
7254
|
-
<xsl:call-template name="get_fn_list_for_element"/>
|
7255
|
-
</xsl:when>
|
7256
|
-
<xsl:otherwise>
|
7257
|
-
<xsl:call-template name="get_fn_list"/>
|
7258
|
-
</xsl:otherwise>
|
7259
|
-
</xsl:choose> -->
|
7260
7300
|
</xsl:variable>
|
7261
7301
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
7262
7302
|
|
7263
7303
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
7264
|
-
|
7265
|
-
<xsl:variable name="reference_">
|
7266
|
-
<xsl:value-of select="@reference"/>
|
7267
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
7268
|
-
</xsl:variable>
|
7269
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
7304
|
+
|
7270
7305
|
<!-- fn sequence number in document -->
|
7271
|
-
<xsl:variable name="current_fn_number"
|
7272
|
-
|
7273
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
7274
|
-
<xsl:otherwise>
|
7275
|
-
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
7276
|
-
</xsl:otherwise>
|
7277
|
-
</xsl:choose>
|
7278
|
-
</xsl:variable>
|
7306
|
+
<xsl:variable name="current_fn_number" select="@reference"/>
|
7307
|
+
|
7279
7308
|
<xsl:variable name="current_fn_number_text">
|
7280
7309
|
|
7281
7310
|
<xsl:value-of select="$current_fn_number"/>
|
7282
7311
|
|
7283
7312
|
</xsl:variable>
|
7284
7313
|
|
7285
|
-
<xsl:variable name="ref_id"
|
7286
|
-
|
7287
|
-
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
7288
|
-
<xsl:otherwise>
|
7289
|
-
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
7290
|
-
</xsl:otherwise>
|
7291
|
-
</xsl:choose>
|
7292
|
-
</xsl:variable>
|
7314
|
+
<xsl:variable name="ref_id" select="@target"/>
|
7315
|
+
|
7293
7316
|
<xsl:variable name="footnote_inline">
|
7294
7317
|
<fo:inline role="Reference">
|
7295
7318
|
|
@@ -7334,7 +7357,9 @@
|
|
7334
7357
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
7335
7358
|
<xsl:copy-of select="$footnote_inline"/>
|
7336
7359
|
</xsl:when>
|
7360
|
+
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
7337
7361
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
7362
|
+
|
7338
7363
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
7339
7364
|
<xsl:copy-of select="$footnote_inline"/>
|
7340
7365
|
<fo:footnote-body role="Note">
|
@@ -7351,7 +7376,10 @@
|
|
7351
7376
|
<xsl:value-of select="$current_fn_number_text"/>
|
7352
7377
|
|
7353
7378
|
</fo:inline>
|
7354
|
-
<xsl:apply-templates/>
|
7379
|
+
<!-- <xsl:apply-templates /> -->
|
7380
|
+
<!-- <ref_id><xsl:value-of select="$ref_id"/></ref_id>
|
7381
|
+
<here><xsl:copy-of select="$footnotes"/></here> -->
|
7382
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
|
7355
7383
|
</xsl:variable>
|
7356
7384
|
|
7357
7385
|
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
@@ -7405,77 +7433,136 @@
|
|
7405
7433
|
</xsl:choose>
|
7406
7434
|
</xsl:template>
|
7407
7435
|
|
7408
|
-
<xsl:template name="get_fn_list_for_element">
|
7409
|
-
<xsl:choose>
|
7410
|
-
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
7411
|
-
<fn gen_id="{generate-id(.)}">
|
7412
|
-
<xsl:copy-of select="@*"/>
|
7413
|
-
<xsl:copy-of select="node()"/>
|
7414
|
-
</fn>
|
7415
|
-
</xsl:when>
|
7416
|
-
<xsl:otherwise>
|
7417
|
-
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
7418
|
-
<xsl:variable name="element_id" select="@id"/>
|
7419
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
7420
|
-
<!-- copy unique fn -->
|
7421
|
-
<fn gen_id="{generate-id(.)}">
|
7422
|
-
<xsl:copy-of select="@*"/>
|
7423
|
-
<xsl:copy-of select="node()"/>
|
7424
|
-
</fn>
|
7425
|
-
</xsl:for-each>
|
7426
|
-
</xsl:for-each>
|
7427
|
-
</xsl:otherwise>
|
7428
|
-
</xsl:choose>
|
7429
|
-
</xsl:template>
|
7430
7436
|
<!-- ============================ -->
|
7431
7437
|
<!-- table's footnotes rendering -->
|
7432
7438
|
<!-- ============================ -->
|
7433
|
-
<xsl:template name="table_fn_display">
|
7434
|
-
<xsl:variable name="references">
|
7435
7439
|
|
7440
|
+
<!-- table/fmt-footnote-container -->
|
7441
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'fmt-footnote-container']"/>
|
7442
|
+
|
7443
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'fmt-footnote-container']">
|
7444
|
+
<xsl:for-each select=".">
|
7445
|
+
<xsl:call-template name="table_fn_display"/>
|
7446
|
+
</xsl:for-each>
|
7447
|
+
</xsl:template>
|
7448
|
+
|
7449
|
+
<xsl:template name="table_fn_display">
|
7450
|
+
<!-- <xsl:variable name="references">
|
7451
|
+
<xsl:if test="$namespace = 'bsi'">
|
7452
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) = 'name']">
|
7453
|
+
<xsl:call-template name="create_fn" />
|
7454
|
+
</xsl:for-each>
|
7455
|
+
</xsl:if>
|
7436
7456
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
7437
|
-
<xsl:call-template name="create_fn"/>
|
7457
|
+
<xsl:call-template name="create_fn" />
|
7438
7458
|
</xsl:for-each>
|
7439
|
-
</xsl:variable>
|
7440
|
-
|
7441
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
7459
|
+
</xsl:variable> -->
|
7460
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn">
|
7442
7461
|
<xsl:variable name="reference" select="@reference"/>
|
7443
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7462
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
7463
|
+
<xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
7444
7464
|
|
7445
7465
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
7466
|
+
<xsl:copy-of select="@id"/>
|
7446
7467
|
<xsl:call-template name="refine_table-fn-style"/>
|
7447
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
7448
|
-
<xsl:call-template name="refine_table-fn-number-style"/>
|
7449
|
-
|
7450
|
-
<xsl:value-of select="@reference"/>
|
7451
7468
|
|
7452
|
-
|
7453
|
-
|
7454
|
-
|
7455
|
-
</xsl:if> -->
|
7469
|
+
<xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
|
7470
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
7471
|
+
</xsl:apply-templates>
|
7456
7472
|
|
7457
|
-
</fo:inline>
|
7458
7473
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
7459
|
-
<xsl:copy-of select="./node()"/>
|
7474
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
7475
|
+
<xsl:apply-templates/>
|
7460
7476
|
</fo:inline>
|
7461
7477
|
|
7462
7478
|
</fo:block>
|
7463
7479
|
|
7464
|
-
</xsl:if>
|
7480
|
+
<!-- </xsl:if> -->
|
7465
7481
|
</xsl:for-each>
|
7466
7482
|
</xsl:template> <!-- table_fn_display -->
|
7467
7483
|
|
7484
|
+
<!-- fmt-fn-body/fmt-fn-label in text -->
|
7485
|
+
<xsl:template match="*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"/>
|
7486
|
+
|
7487
|
+
<!-- table//fmt-fn-body//fmt-fn-label -->
|
7488
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
7489
|
+
<xsl:param name="process">false</xsl:param>
|
7490
|
+
<xsl:if test="$process = 'true'">
|
7491
|
+
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
7492
|
+
|
7493
|
+
<!-- tab is padding-right -->
|
7494
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
7495
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
7496
|
+
</xsl:apply-templates>
|
7497
|
+
|
7498
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
7499
|
+
<fo:inline font-style="normal">(</fo:inline>
|
7500
|
+
</xsl:if> -->
|
7501
|
+
|
7502
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
7503
|
+
<xsl:text>※</xsl:text>
|
7504
|
+
</xsl:if> -->
|
7505
|
+
|
7506
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
7507
|
+
<!-- <xsl:value-of select="normalize-space()"/> -->
|
7508
|
+
<xsl:apply-templates/>
|
7509
|
+
|
7510
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
7511
|
+
<fo:inline font-style="normal">)</fo:inline>
|
7512
|
+
</xsl:if> -->
|
7513
|
+
|
7514
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
7515
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
7516
|
+
<xsl:text>)</xsl:text>
|
7517
|
+
</xsl:if> -->
|
7518
|
+
|
7519
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
7520
|
+
<xsl:text>:</xsl:text>
|
7521
|
+
</xsl:if> -->
|
7522
|
+
|
7523
|
+
</fo:inline>
|
7524
|
+
</xsl:if>
|
7525
|
+
</xsl:template> <!-- fmt-fn-body//fmt-fn-label -->
|
7526
|
+
|
7527
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
7528
|
+
<xsl:param name="process">false</xsl:param>
|
7529
|
+
<xsl:if test="$process = 'true'">
|
7530
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
7531
|
+
|
7532
|
+
</xsl:if>
|
7533
|
+
</xsl:template>
|
7534
|
+
|
7535
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
7536
|
+
<fo:inline xsl:use-attribute-sets="table-fmt-fn-label-style" role="SKIP">
|
7537
|
+
<xsl:call-template name="refine_table-fmt-fn-label-style"/>
|
7538
|
+
<xsl:apply-templates/>
|
7539
|
+
</fo:inline>
|
7540
|
+
</xsl:template>
|
7541
|
+
|
7542
|
+
<!-- <xsl:template match="*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']"/> -->
|
7543
|
+
<!--
|
7468
7544
|
<xsl:template name="create_fn">
|
7469
7545
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
7470
|
-
<xsl:if test="ancestor::*[local-name()='table'][1]/@id">
|
7546
|
+
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> - for footnotes in tables -
|
7471
7547
|
<xsl:attribute name="id">
|
7472
7548
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
7473
7549
|
</xsl:attribute>
|
7474
7550
|
</xsl:if>
|
7475
|
-
|
7476
|
-
|
7551
|
+
<xsl:if test="$namespace = 'itu'">
|
7552
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
7553
|
+
<xsl:attribute name="preface">true</xsl:attribute>
|
7554
|
+
</xsl:if>
|
7555
|
+
</xsl:if>
|
7556
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
7557
|
+
<xsl:attribute name="id">
|
7558
|
+
<xsl:value-of select="@reference"/>
|
7559
|
+
<xsl:text>_</xsl:text>
|
7560
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
7561
|
+
</xsl:attribute>
|
7562
|
+
</xsl:if>
|
7563
|
+
<xsl:apply-templates />
|
7477
7564
|
</fn>
|
7478
|
-
</xsl:template>
|
7565
|
+
</xsl:template> -->
|
7479
7566
|
|
7480
7567
|
<!-- footnotes for table's name rendering -->
|
7481
7568
|
<xsl:template name="table_name_fn_display">
|
@@ -7494,123 +7581,171 @@
|
|
7494
7581
|
<!-- ============================ -->
|
7495
7582
|
<!-- figure's footnotes rendering -->
|
7496
7583
|
<!-- ============================ -->
|
7497
|
-
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
7498
7584
|
|
7499
|
-
|
7500
|
-
|
7501
|
-
|
7502
|
-
|
7503
|
-
|
7504
|
-
<xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
|
7585
|
+
<!-- figure/fmt-footnote-container -->
|
7586
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-footnote-container']"/>
|
7587
|
+
|
7588
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
7589
|
+
<xsl:template name="figure_fn_display">
|
7505
7590
|
|
7506
|
-
<!-- all footnotes relates to the current figure -->
|
7507
7591
|
<xsl:variable name="references">
|
7508
|
-
<xsl:for-each select="
|
7509
|
-
<
|
7510
|
-
|
7511
|
-
|
7592
|
+
<xsl:for-each select="./*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
7593
|
+
<xsl:variable name="curr_id" select="@id"/>
|
7594
|
+
<!-- <curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
7595
|
+
<curr><xsl:copy-of select="."/></curr>
|
7596
|
+
<ancestor><xsl:copy-of select="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn']]]"/></ancestor> -->
|
7597
|
+
<xsl:choose>
|
7598
|
+
<!-- skip figure/name/fn -->
|
7599
|
+
<xsl:when test="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn'][@target = $curr_id]]]"><!-- skip --></xsl:when>
|
7600
|
+
<xsl:otherwise>
|
7601
|
+
<xsl:element name="figure" namespace="{$namespace_full}">
|
7602
|
+
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
7603
|
+
<xsl:copy-of select="."/>
|
7604
|
+
</xsl:element>
|
7605
|
+
</xsl:element>
|
7606
|
+
</xsl:otherwise>
|
7607
|
+
</xsl:choose>
|
7512
7608
|
</xsl:for-each>
|
7513
7609
|
</xsl:variable>
|
7610
|
+
<!-- <references><xsl:copy-of select="$references"/></references> -->
|
7514
7611
|
|
7515
|
-
<xsl:if test="xalan:nodeset($references)
|
7612
|
+
<xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
7516
7613
|
|
7517
7614
|
<xsl:variable name="key_iso">
|
7518
7615
|
|
7519
7616
|
</xsl:variable>
|
7520
7617
|
|
7521
7618
|
<fo:block>
|
7619
|
+
<!-- current hierarchy is 'figure' element -->
|
7620
|
+
<xsl:variable name="following_dl_colwidths">
|
7621
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
7622
|
+
<xsl:variable name="simple-table">
|
7623
|
+
<!-- <xsl:variable name="doc_ns">
|
7624
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
7625
|
+
</xsl:variable>
|
7626
|
+
<xsl:variable name="ns">
|
7627
|
+
<xsl:choose>
|
7628
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
7629
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
7630
|
+
</xsl:when>
|
7631
|
+
<xsl:otherwise>
|
7632
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
7633
|
+
</xsl:otherwise>
|
7634
|
+
</xsl:choose>
|
7635
|
+
</xsl:variable> -->
|
7522
7636
|
|
7523
|
-
|
7524
|
-
|
7525
|
-
|
7526
|
-
|
7527
|
-
|
7528
|
-
|
7529
|
-
</xsl:variable>
|
7530
|
-
<xsl:variable name="ns">
|
7531
|
-
<xsl:choose>
|
7532
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
7533
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
7534
|
-
</xsl:when>
|
7535
|
-
<xsl:otherwise>
|
7536
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
7537
|
-
</xsl:otherwise>
|
7538
|
-
</xsl:choose>
|
7539
|
-
</xsl:variable> -->
|
7637
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
7638
|
+
<tbody>
|
7639
|
+
<xsl:apply-templates mode="dl"/>
|
7640
|
+
</tbody>
|
7641
|
+
</xsl:for-each>
|
7642
|
+
</xsl:variable>
|
7540
7643
|
|
7541
|
-
|
7542
|
-
|
7543
|
-
|
7544
|
-
|
7545
|
-
</xsl:for-each>
|
7546
|
-
</xsl:variable>
|
7644
|
+
<xsl:call-template name="calculate-column-widths">
|
7645
|
+
<xsl:with-param name="cols-count" select="2"/>
|
7646
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
7647
|
+
</xsl:call-template>
|
7547
7648
|
|
7548
|
-
|
7549
|
-
|
7550
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
7551
|
-
</xsl:call-template>
|
7649
|
+
</xsl:if>
|
7650
|
+
</xsl:variable>
|
7552
7651
|
|
7553
|
-
|
7554
|
-
|
7652
|
+
<xsl:variable name="maxlength_dt">
|
7653
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
7654
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
7655
|
+
</xsl:for-each>
|
7656
|
+
</xsl:variable>
|
7555
7657
|
|
7556
|
-
|
7557
|
-
|
7558
|
-
|
7559
|
-
|
7560
|
-
|
7658
|
+
<fo:table width="95%" table-layout="fixed">
|
7659
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
7660
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7661
|
+
|
7662
|
+
</xsl:if>
|
7663
|
+
<xsl:choose>
|
7664
|
+
<!-- if there 'dl', then set same columns width -->
|
7665
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
7666
|
+
<xsl:call-template name="setColumnWidth_dl">
|
7667
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
7668
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
7669
|
+
</xsl:call-template>
|
7670
|
+
</xsl:when>
|
7671
|
+
<xsl:otherwise>
|
7672
|
+
<fo:table-column column-width="5%"/>
|
7673
|
+
<fo:table-column column-width="95%"/>
|
7674
|
+
</xsl:otherwise>
|
7675
|
+
</xsl:choose>
|
7676
|
+
<fo:table-body>
|
7677
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn"> -->
|
7678
|
+
<xsl:for-each select="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
7561
7679
|
|
7562
|
-
|
7563
|
-
<xsl:if test="
|
7564
|
-
<
|
7680
|
+
<xsl:variable name="reference" select="@reference"/>
|
7681
|
+
<!-- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
7682
|
+
<fo:table-row>
|
7683
|
+
<fo:table-cell>
|
7684
|
+
<fo:block>
|
7565
7685
|
|
7566
|
-
|
7567
|
-
|
7568
|
-
|
7569
|
-
|
7570
|
-
<xsl:call-template name="setColumnWidth_dl">
|
7571
|
-
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
7572
|
-
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
7573
|
-
</xsl:call-template>
|
7574
|
-
</xsl:when>
|
7575
|
-
<xsl:otherwise>
|
7576
|
-
<fo:table-column column-width="5%"/>
|
7577
|
-
<fo:table-column column-width="95%"/>
|
7578
|
-
</xsl:otherwise>
|
7579
|
-
</xsl:choose>
|
7580
|
-
<fo:table-body>
|
7581
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
7582
|
-
<xsl:variable name="reference" select="@reference"/>
|
7583
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
7584
|
-
<fo:table-row>
|
7585
|
-
<fo:table-cell>
|
7586
|
-
<fo:block>
|
7587
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
|
7588
|
-
<xsl:value-of select="@reference"/>
|
7686
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
|
7687
|
+
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
7688
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
7689
|
+
<xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
|
7589
7690
|
</fo:inline>
|
7590
|
-
</fo:block>
|
7591
|
-
</fo:table-cell>
|
7592
|
-
<fo:table-cell>
|
7593
|
-
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
7594
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
7595
7691
|
|
7596
|
-
|
7692
|
+
</fo:block>
|
7693
|
+
</fo:table-cell>
|
7694
|
+
<fo:table-cell>
|
7695
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
7696
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
7697
|
+
|
7698
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
7597
7699
|
|
7598
|
-
|
7599
|
-
<xsl:copy-of select="./node()"/>
|
7600
|
-
</fo:block>
|
7601
|
-
</fo:table-cell>
|
7602
|
-
</fo:table-row>
|
7603
|
-
</xsl:if>
|
7604
|
-
</xsl:for-each>
|
7605
|
-
</fo:table-body>
|
7606
|
-
</fo:table>
|
7700
|
+
</xsl:if>
|
7607
7701
|
|
7702
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
7703
|
+
<xsl:apply-templates/>
|
7704
|
+
</fo:block>
|
7705
|
+
</fo:table-cell>
|
7706
|
+
</fo:table-row>
|
7707
|
+
<!-- </xsl:if> -->
|
7708
|
+
</xsl:for-each>
|
7709
|
+
</fo:table-body>
|
7710
|
+
</fo:table>
|
7608
7711
|
</fo:block>
|
7609
7712
|
</xsl:if>
|
7610
|
-
</xsl:template> <!--
|
7713
|
+
</xsl:template> <!-- figure_fn_display -->
|
7714
|
+
|
7715
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
7716
|
+
<xsl:param name="process">false</xsl:param>
|
7717
|
+
<xsl:if test="$process = 'true'">
|
7718
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
7719
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
7720
|
+
|
7721
|
+
<!-- tab is padding-right -->
|
7722
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
7723
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
7724
|
+
</xsl:apply-templates>
|
7725
|
+
|
7726
|
+
<xsl:apply-templates/>
|
7727
|
+
|
7728
|
+
</fo:inline>
|
7729
|
+
</xsl:if>
|
7730
|
+
</xsl:template> <!-- figure//fmt-fn-body//fmt-fn-label -->
|
7731
|
+
|
7732
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
7733
|
+
<xsl:param name="process">false</xsl:param>
|
7734
|
+
<xsl:if test="$process = 'true'">
|
7735
|
+
|
7736
|
+
</xsl:if>
|
7737
|
+
</xsl:template>
|
7738
|
+
|
7739
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
7740
|
+
<fo:inline xsl:use-attribute-sets="figure-fmt-fn-label-style" role="SKIP">
|
7741
|
+
<xsl:call-template name="refine_figure-fmt-fn-label-style"/>
|
7742
|
+
<xsl:apply-templates/>
|
7743
|
+
</fo:inline>
|
7744
|
+
</xsl:template>
|
7611
7745
|
|
7612
7746
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
7613
7747
|
<!-- figure's footnote label -->
|
7748
|
+
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
7614
7749
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
|
7615
7750
|
<xsl:variable name="key_iso">
|
7616
7751
|
|
@@ -7619,7 +7754,7 @@
|
|
7619
7754
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7620
7755
|
|
7621
7756
|
</xsl:if>
|
7622
|
-
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
7757
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
7623
7758
|
<!-- <xsl:value-of select="@reference"/> -->
|
7624
7759
|
<xsl:apply-templates/>
|
7625
7760
|
</fo:inline>
|
@@ -7629,38 +7764,65 @@
|
|
7629
7764
|
<!-- END: figure's footnotes rendering -->
|
7630
7765
|
<!-- ============================ -->
|
7631
7766
|
|
7632
|
-
<!-- fn reference in the
|
7767
|
+
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
7768
|
+
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
7633
7769
|
<xsl:template match="*[local-name()='fn']">
|
7634
7770
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
7635
7771
|
|
7636
7772
|
<xsl:call-template name="refine_fn-reference-style"/>
|
7637
7773
|
|
7638
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7639
|
-
|
7640
|
-
|
7774
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7775
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
7776
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
7777
|
+
<!-- <xsl:attribute name="internal-destination">
|
7641
7778
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
7642
7779
|
</xsl:attribute>
|
7643
7780
|
</xsl:if>
|
7781
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
7782
|
+
<xsl:attribute name="internal-destination">
|
7783
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
7784
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
7785
|
+
</xsl:attribute>
|
7786
|
+
</xsl:if> -->
|
7787
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
7788
|
+
<xsl:text>※</xsl:text>
|
7789
|
+
</xsl:if> -->
|
7790
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
7644
7791
|
|
7645
|
-
|
7792
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
7646
7793
|
|
7794
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
7795
|
+
<xsl:text>)</xsl:text>
|
7796
|
+
</xsl:if> -->
|
7647
7797
|
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
7648
7798
|
<!-- <xsl:if test="$namespace = 'jis'">
|
7649
7799
|
<fo:inline font-weight="normal">)</fo:inline>
|
7650
7800
|
</xsl:if> -->
|
7651
7801
|
</fo:basic-link>
|
7652
7802
|
</fo:inline>
|
7653
|
-
</xsl:template>
|
7803
|
+
</xsl:template> <!-- fn -->
|
7654
7804
|
|
7805
|
+
<!-- fn/text() -->
|
7655
7806
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
7656
7807
|
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
7657
7808
|
</xsl:template>
|
7658
7809
|
|
7659
|
-
|
7810
|
+
<!-- fn//p fmt-fn-body//p -->
|
7811
|
+
<xsl:template match="*[local-name()='fn']//*[local-name()='p'] | *[local-name() = 'fmt-fn-body']//*[local-name()='p']">
|
7660
7812
|
<fo:inline role="P">
|
7661
7813
|
<xsl:apply-templates/>
|
7662
7814
|
</fo:inline>
|
7663
7815
|
</xsl:template>
|
7816
|
+
|
7817
|
+
<xsl:template name="insertFootnoteSeparatorCommon">
|
7818
|
+
<xsl:param name="leader_length">30%</xsl:param>
|
7819
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
7820
|
+
<fo:block>
|
7821
|
+
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
7822
|
+
</fo:block>
|
7823
|
+
</fo:static-content>
|
7824
|
+
</xsl:template>
|
7825
|
+
|
7664
7826
|
<!-- ===================== -->
|
7665
7827
|
<!-- END Footnotes processing -->
|
7666
7828
|
<!-- ===================== -->
|
@@ -7937,11 +8099,11 @@
|
|
7937
8099
|
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
7938
8100
|
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
7939
8101
|
|
7940
|
-
|
7941
|
-
|
7942
|
-
|
7943
|
-
|
7944
|
-
|
8102
|
+
<xsl:call-template name="setColumnWidth_dl">
|
8103
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
8104
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
8105
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
8106
|
+
</xsl:call-template>
|
7945
8107
|
|
7946
8108
|
<fo:table-body>
|
7947
8109
|
|
@@ -7975,6 +8137,14 @@
|
|
7975
8137
|
|
7976
8138
|
</xsl:template> <!-- END: dl -->
|
7977
8139
|
|
8140
|
+
<xsl:template match="@*|node()" mode="dt_clean">
|
8141
|
+
<xsl:copy>
|
8142
|
+
<xsl:apply-templates select="@*|node()" mode="dt_clean"/>
|
8143
|
+
</xsl:copy>
|
8144
|
+
</xsl:template>
|
8145
|
+
|
8146
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="dt_clean"/>
|
8147
|
+
|
7978
8148
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
7979
8149
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
7980
8150
|
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
@@ -8004,10 +8174,12 @@
|
|
8004
8174
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
8005
8175
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
8006
8176
|
|
8177
|
+
<!-- dl/name -->
|
8007
8178
|
<xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
8008
8179
|
<xsl:param name="process">false</xsl:param>
|
8009
8180
|
<xsl:if test="$process = 'true'">
|
8010
8181
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
8182
|
+
|
8011
8183
|
<xsl:apply-templates/>
|
8012
8184
|
</fo:block>
|
8013
8185
|
</xsl:if>
|
@@ -8021,6 +8193,10 @@
|
|
8021
8193
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
8022
8194
|
|
8023
8195
|
<xsl:choose>
|
8196
|
+
<!-- <xsl:when test="@class = 'formula_dl' and local-name(..) = 'figure'">
|
8197
|
+
<fo:table-column column-width="10%"/>
|
8198
|
+
<fo:table-column column-width="90%"/>
|
8199
|
+
</xsl:when> -->
|
8024
8200
|
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
8025
8201
|
<xsl:call-template name="insertTableColumnWidth">
|
8026
8202
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -10144,6 +10320,27 @@
|
|
10144
10320
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
10145
10321
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
10146
10322
|
</xsl:when> -->
|
10323
|
+
|
10324
|
+
<!-- <xsl:when test="not(starts-with(@target, 'http:') or starts-with(@target, 'https') or starts-with(@target, 'www') or starts-with(@target, 'mailto') or starts-with(@target, 'ftp'))">
|
10325
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
10326
|
+
<xsl:variable name="filename">
|
10327
|
+
<xsl:call-template name="substring-after-last">
|
10328
|
+
<xsl:with-param name="value" select="$target_"/>
|
10329
|
+
<xsl:with-param name="delimiter" select="'/'"/>
|
10330
|
+
</xsl:call-template>
|
10331
|
+
</xsl:variable>
|
10332
|
+
<xsl:variable name="target_filepath" select="concat($inputxml_basepath, @target)"/>
|
10333
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($target_filepath)))"/>
|
10334
|
+
<xsl:choose>
|
10335
|
+
<xsl:when test="$file_exists = 'true'">
|
10336
|
+
<xsl:value-of select="concat('url(embedded-file:', $filename, ')')"/>
|
10337
|
+
</xsl:when>
|
10338
|
+
<xsl:otherwise>
|
10339
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
10340
|
+
</xsl:otherwise>
|
10341
|
+
</xsl:choose>
|
10342
|
+
</xsl:when> -->
|
10343
|
+
|
10147
10344
|
<xsl:otherwise>
|
10148
10345
|
<xsl:value-of select="normalize-space(@target)"/>
|
10149
10346
|
</xsl:otherwise>
|
@@ -10448,7 +10645,7 @@
|
|
10448
10645
|
|
10449
10646
|
<xsl:template name="refine_note_block_style">
|
10450
10647
|
|
10451
|
-
</xsl:template>
|
10648
|
+
</xsl:template> <!-- refine_note_block_style -->
|
10452
10649
|
|
10453
10650
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
10454
10651
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
@@ -10640,10 +10837,21 @@
|
|
10640
10837
|
</xsl:template>
|
10641
10838
|
|
10642
10839
|
<xsl:template name="showFigureKey">
|
10643
|
-
<xsl:for-each select="*[local-name() = 'note'
|
10644
|
-
<xsl:
|
10840
|
+
<xsl:for-each select="*[(local-name() = 'note' and not(@type = 'units')) or local-name() = 'example']">
|
10841
|
+
<xsl:choose>
|
10842
|
+
<xsl:when test="local-name() = 'note'">
|
10843
|
+
<xsl:call-template name="note"/>
|
10844
|
+
</xsl:when>
|
10845
|
+
<xsl:when test="local-name() = 'example'">
|
10846
|
+
<xsl:call-template name="example"/>
|
10847
|
+
</xsl:when>
|
10848
|
+
<xsl:otherwise>
|
10849
|
+
<xsl:apply-templates select="."/>
|
10850
|
+
</xsl:otherwise>
|
10851
|
+
</xsl:choose>
|
10645
10852
|
</xsl:for-each>
|
10646
|
-
|
10853
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
10854
|
+
<xsl:call-template name="figure_fn_display"/>
|
10647
10855
|
</xsl:template>
|
10648
10856
|
|
10649
10857
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -11537,10 +11745,10 @@
|
|
11537
11745
|
<xsl:when test="@type = 'section-title'">
|
11538
11746
|
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
11539
11747
|
<xsl:text>: </xsl:text>
|
11540
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
11748
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
11541
11749
|
</xsl:when>
|
11542
11750
|
<xsl:otherwise>
|
11543
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
11751
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
11544
11752
|
</xsl:otherwise>
|
11545
11753
|
</xsl:choose>
|
11546
11754
|
</xsl:when>
|
@@ -11871,9 +12079,15 @@
|
|
11871
12079
|
</xsl:if>
|
11872
12080
|
</xsl:template>
|
11873
12081
|
|
12082
|
+
<!-- figure/fn -->
|
11874
12083
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
11875
|
-
|
12084
|
+
<!-- figure/note -->
|
12085
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
12086
|
+
<!-- figure/example -->
|
12087
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
11876
12088
|
|
12089
|
+
<!-- figure/note[@type = 'units'] -->
|
12090
|
+
<!-- image/note[@type = 'units'] -->
|
11877
12091
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
11878
12092
|
<fo:block text-align="right" keep-with-next="always">
|
11879
12093
|
<xsl:apply-templates/>
|
@@ -11994,6 +12208,7 @@
|
|
11994
12208
|
</xsl:choose>
|
11995
12209
|
</xsl:template>
|
11996
12210
|
|
12211
|
+
<!-- fn -->
|
11997
12212
|
<xsl:template match="*[local-name() = 'fn']" mode="contents"/>
|
11998
12213
|
<xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/>
|
11999
12214
|
|
@@ -12893,7 +13108,7 @@
|
|
12893
13108
|
text line 1
|
12894
13109
|
text line 2
|
12895
13110
|
-->
|
12896
|
-
<xsl:template match="*[local-name() = 'example']">
|
13111
|
+
<xsl:template match="*[local-name() = 'example']" name="example">
|
12897
13112
|
|
12898
13113
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
12899
13114
|
|
@@ -12999,6 +13214,7 @@
|
|
12999
13214
|
|
13000
13215
|
</xsl:template>
|
13001
13216
|
|
13217
|
+
<!-- example/name -->
|
13002
13218
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
13003
13219
|
<xsl:param name="fo_element">block</xsl:param>
|
13004
13220
|
|
@@ -13024,7 +13240,8 @@
|
|
13024
13240
|
|
13025
13241
|
</xsl:template>
|
13026
13242
|
|
13027
|
-
|
13243
|
+
<!-- table/example/name, table/tfoot//example/name -->
|
13244
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
|
13028
13245
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
13029
13246
|
|
13030
13247
|
<xsl:apply-templates/>
|
@@ -14672,8 +14889,33 @@
|
|
14672
14889
|
|
14673
14890
|
<xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
14674
14891
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14892
|
+
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14893
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
14894
|
+
|
14675
14895
|
<xsl:variable name="target" select="@target"/>
|
14896
|
+
|
14676
14897
|
<xsl:for-each select="*[local-name() = 'tab']">
|
14898
|
+
|
14899
|
+
<xsl:if test="position() = 1">
|
14900
|
+
<!-- first column (data before first `tab`) -->
|
14901
|
+
<fo:table-cell>
|
14902
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
14903
|
+
<xsl:call-template name="insert_basic_link">
|
14904
|
+
<xsl:with-param name="element">
|
14905
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
14906
|
+
<xsl:for-each select="preceding-sibling::node()">
|
14907
|
+
<xsl:choose>
|
14908
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14909
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
14910
|
+
</xsl:choose>
|
14911
|
+
</xsl:for-each>
|
14912
|
+
</fo:basic-link>
|
14913
|
+
</xsl:with-param>
|
14914
|
+
</xsl:call-template>
|
14915
|
+
</fo:block>
|
14916
|
+
</fo:table-cell>
|
14917
|
+
</xsl:if>
|
14918
|
+
|
14677
14919
|
<xsl:variable name="current_id" select="generate-id()"/>
|
14678
14920
|
<fo:table-cell>
|
14679
14921
|
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
@@ -14724,11 +14966,25 @@
|
|
14724
14966
|
|
14725
14967
|
<xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
14726
14968
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14969
|
+
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14727
14970
|
<xsl:for-each select="*[local-name() = 'tab']">
|
14971
|
+
<xsl:if test="position() = 1">
|
14972
|
+
<td>
|
14973
|
+
<xsl:for-each select="preceding-sibling::node()">
|
14974
|
+
<xsl:choose>
|
14975
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14976
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
14977
|
+
</xsl:choose>
|
14978
|
+
</xsl:for-each>
|
14979
|
+
</td>
|
14980
|
+
</xsl:if>
|
14728
14981
|
<xsl:variable name="current_id" select="generate-id()"/>
|
14729
14982
|
<td>
|
14730
14983
|
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
14731
|
-
<xsl:
|
14984
|
+
<xsl:choose>
|
14985
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14986
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
14987
|
+
</xsl:choose>
|
14732
14988
|
</xsl:for-each>
|
14733
14989
|
</td>
|
14734
14990
|
</xsl:for-each>
|
@@ -16259,6 +16515,7 @@
|
|
16259
16515
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
16260
16516
|
</fn>
|
16261
16517
|
-->
|
16518
|
+
<!-- fn in text -->
|
16262
16519
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
16263
16520
|
<xsl:variable name="p_fn_">
|
16264
16521
|
<xsl:call-template name="get_fn_list"/>
|