metanorma-itu 2.6.1 → 2.6.3
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/itu/html/_coverpage.css +7 -0
- data/lib/isodoc/itu/html/htmlstyle.css +14 -6
- data/lib/isodoc/itu/html/htmlstyle.scss +2 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +618 -248
- data/lib/isodoc/itu/itu.in-force.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +618 -248
- data/lib/isodoc/itu/itu.recommendation.xsl +618 -248
- data/lib/isodoc/itu/itu.resolution.xsl +618 -248
- data/lib/isodoc/itu/itu.service-publication.xsl +618 -248
- data/lib/isodoc/itu/itu.technical-paper.xsl +618 -248
- data/lib/isodoc/itu/itu.technical-report.xsl +618 -248
- data/lib/isodoc/itu/presentation_ref.rb +8 -4
- data/lib/isodoc/itu/presentation_section.rb +118 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +20 -132
- data/lib/isodoc/itu/xref.rb +0 -19
- data/lib/metanorma/itu/basicdoc.rng +71 -59
- data/lib/metanorma/itu/front.rb +2 -1
- data/lib/metanorma/itu/isodoc.rng +60 -18
- data/lib/metanorma/itu/validate.rb +0 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
@@ -1609,11 +1609,9 @@
|
|
1609
1609
|
<xsl:if test="$doctype = 'service-publication'">
|
1610
1610
|
<xsl:attribute name="initial-page-number">auto</xsl:attribute>
|
1611
1611
|
</xsl:if>
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
</fo:block>
|
1616
|
-
</fo:static-content>
|
1612
|
+
|
1613
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
1614
|
+
|
1617
1615
|
<xsl:choose>
|
1618
1616
|
<xsl:when test="$doctype = 'service-publication'">
|
1619
1617
|
<xsl:call-template name="insertHeaderFooterSP">
|
@@ -3879,16 +3877,21 @@
|
|
3879
3877
|
</xsl:template>
|
3880
3878
|
|
3881
3879
|
<xsl:attribute-set name="table-fn-number-style">
|
3880
|
+
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
3881
|
+
|
3882
|
+
<!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
|
3883
|
+
|
3884
|
+
</xsl:attribute-set> <!-- table-fn-number-style -->
|
3885
|
+
|
3886
|
+
<xsl:attribute-set name="table-fmt-fn-label-style">
|
3882
3887
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3883
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
3884
3888
|
|
3885
3889
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3886
|
-
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
3887
3890
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
3888
3891
|
|
3889
|
-
</xsl:attribute-set> <!-- table-fn-
|
3892
|
+
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
3890
3893
|
|
3891
|
-
<xsl:template name="refine_table-fn-
|
3894
|
+
<xsl:template name="refine_table-fmt-fn-label-style">
|
3892
3895
|
|
3893
3896
|
</xsl:template>
|
3894
3897
|
|
@@ -3903,11 +3906,18 @@
|
|
3903
3906
|
</xsl:attribute-set>
|
3904
3907
|
|
3905
3908
|
<xsl:attribute-set name="figure-fn-number-style">
|
3906
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3907
3909
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
3910
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
3911
|
+
|
3912
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
3913
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3908
3914
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3909
3915
|
|
3910
|
-
</xsl:attribute-set>
|
3916
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
3917
|
+
|
3918
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
3919
|
+
|
3920
|
+
</xsl:template>
|
3911
3921
|
|
3912
3922
|
<xsl:attribute-set name="figure-fn-body-style">
|
3913
3923
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -5441,9 +5451,13 @@
|
|
5441
5451
|
|
5442
5452
|
<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']"/>
|
5443
5453
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
5444
|
-
|
5445
|
-
|
5446
|
-
|
5454
|
+
<!-- <xsl:choose>
|
5455
|
+
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
5456
|
+
<xsl:otherwise>
|
5457
|
+
|
5458
|
+
</xsl:otherwise>
|
5459
|
+
</xsl:choose> -->
|
5460
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
5447
5461
|
</xsl:if>
|
5448
5462
|
|
5449
5463
|
<xsl:choose>
|
@@ -5490,7 +5504,7 @@
|
|
5490
5504
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
5491
5505
|
</xsl:when>
|
5492
5506
|
<xsl:otherwise>
|
5493
|
-
<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 -->
|
5507
|
+
<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 -->
|
5494
5508
|
</xsl:otherwise>
|
5495
5509
|
</xsl:choose>
|
5496
5510
|
|
@@ -5501,13 +5515,26 @@
|
|
5501
5515
|
|
5502
5516
|
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
5503
5517
|
|
5504
|
-
|
5505
|
-
|
5506
|
-
|
5507
|
-
|
5508
|
-
|
5509
|
-
|
5510
|
-
|
5518
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
|
5519
|
+
|
5520
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
5521
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
5522
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
5523
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
5524
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
5525
|
+
</xsl:call-template>
|
5526
|
+
</xsl:for-each>
|
5527
|
+
|
5528
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
5529
|
+
<xsl:if test="$namespace = 'plateau'">
|
5530
|
+
<xsl:apply-templates select="*[not(local-name()='thead') and not(local-name()='tbody') and not(local-name()='tfoot') and not(local-name()='name')]" />
|
5531
|
+
<xsl:for-each select="*[local-name()='tbody']"> - select context to tbody -
|
5532
|
+
<xsl:variable name="table_fn_block">
|
5533
|
+
<xsl:call-template name="table_fn_display" />
|
5534
|
+
</xsl:variable>
|
5535
|
+
<xsl:copy-of select="$table_fn_block"/>
|
5536
|
+
</xsl:for-each>
|
5537
|
+
</xsl:if> -->
|
5511
5538
|
|
5512
5539
|
<xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
|
5513
5540
|
<fo:block keep-with-previous="always" line-height="0.1">
|
@@ -6311,6 +6338,8 @@
|
|
6311
6338
|
<xsl:attribute name="min-height">5mm</xsl:attribute>
|
6312
6339
|
</xsl:if>
|
6313
6340
|
|
6341
|
+
<xsl:call-template name="setColors"/>
|
6342
|
+
|
6314
6343
|
</xsl:template> <!-- setTableRowAttributes -->
|
6315
6344
|
<!-- ===================== -->
|
6316
6345
|
<!-- END Table's row processing -->
|
@@ -6362,6 +6391,7 @@
|
|
6362
6391
|
</xsl:attribute>
|
6363
6392
|
</xsl:if>
|
6364
6393
|
<xsl:call-template name="display-align"/>
|
6394
|
+
<xsl:call-template name="setColors"/>
|
6365
6395
|
</xsl:template>
|
6366
6396
|
|
6367
6397
|
<xsl:template name="display-align">
|
@@ -6377,6 +6407,29 @@
|
|
6377
6407
|
</xsl:if>
|
6378
6408
|
</xsl:template>
|
6379
6409
|
|
6410
|
+
<xsl:template name="setColors">
|
6411
|
+
<xsl:variable name="styles__">
|
6412
|
+
<xsl:call-template name="split">
|
6413
|
+
<xsl:with-param name="pText" select="concat(@style,';')"/>
|
6414
|
+
<xsl:with-param name="sep" select="';'"/>
|
6415
|
+
</xsl:call-template>
|
6416
|
+
</xsl:variable>
|
6417
|
+
<xsl:variable name="quot">"</xsl:variable>
|
6418
|
+
<xsl:variable name="styles_">
|
6419
|
+
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
6420
|
+
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
6421
|
+
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
6422
|
+
<xsl:if test="$key = 'color' or $key = 'background-color'">
|
6423
|
+
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
6424
|
+
</xsl:if>
|
6425
|
+
</xsl:for-each>
|
6426
|
+
</xsl:variable>
|
6427
|
+
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
6428
|
+
<xsl:for-each select="$styles/style">
|
6429
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
6430
|
+
</xsl:for-each>
|
6431
|
+
</xsl:template>
|
6432
|
+
|
6380
6433
|
<!-- cell in table body, footer -->
|
6381
6434
|
<xsl:template match="*[local-name()='td']" name="td">
|
6382
6435
|
<fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
|
@@ -6388,17 +6441,28 @@
|
|
6388
6441
|
|
6389
6442
|
<xsl:call-template name="refine_table-cell-style"/>
|
6390
6443
|
|
6444
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
6445
|
+
|
6391
6446
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
6392
6447
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6393
6448
|
</xsl:if>
|
6394
6449
|
|
6395
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
6396
|
-
|
6397
6450
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
6398
6451
|
<xsl:attribute name="border">1pt solid black</xsl:attribute> <!-- border is mandatory, to determine page width -->
|
6399
6452
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
6400
6453
|
</xsl:if>
|
6401
6454
|
|
6455
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
6456
|
+
<xsl:if test="@colspan and *[local-name() = 'note'][@type = 'units']">
|
6457
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
6458
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
6459
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
6460
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
6461
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
6462
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
6463
|
+
</xsl:if>
|
6464
|
+
</xsl:if>
|
6465
|
+
|
6402
6466
|
<fo:block role="SKIP">
|
6403
6467
|
|
6404
6468
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -6417,7 +6481,8 @@
|
|
6417
6481
|
</fo:table-cell>
|
6418
6482
|
</xsl:template> <!-- td -->
|
6419
6483
|
|
6420
|
-
|
6484
|
+
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
6485
|
+
<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">
|
6421
6486
|
|
6422
6487
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
6423
6488
|
<xsl:copy-of select="@id"/>
|
@@ -6438,65 +6503,54 @@
|
|
6438
6503
|
|
6439
6504
|
</xsl:template> <!-- table/note -->
|
6440
6505
|
|
6441
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
6506
|
+
<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">
|
6442
6507
|
<xsl:apply-templates/>
|
6443
6508
|
</xsl:template>
|
6444
6509
|
|
6445
6510
|
<!-- ===================== -->
|
6446
6511
|
<!-- Footnotes processing -->
|
6447
6512
|
<!-- ===================== -->
|
6513
|
+
|
6514
|
+
<!-- document text (not figures, or tables) footnotes -->
|
6515
|
+
<xsl:variable name="footnotes_">
|
6516
|
+
<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 -->
|
6517
|
+
<!-- <xsl:copy-of select="."/> -->
|
6518
|
+
<xsl:variable name="update_xml_step1">
|
6519
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
6520
|
+
</xsl:variable>
|
6521
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
6522
|
+
</xsl:for-each>
|
6523
|
+
</xsl:variable>
|
6524
|
+
<xsl:variable name="footnotes" select="xalan:nodeset($footnotes_)"/>
|
6525
|
+
|
6448
6526
|
<!--
|
6449
6527
|
<fn reference="1">
|
6450
6528
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
6451
6529
|
</fn>
|
6452
6530
|
-->
|
6453
|
-
<!-- footnotes in text (title, bibliography, main body, table's, figure's names
|
6531
|
+
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
6532
|
+
<!-- fn in text -->
|
6454
6533
|
<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">
|
6455
6534
|
|
6456
|
-
<!-- list of
|
6535
|
+
<!-- list of unique footnotes -->
|
6457
6536
|
<xsl:variable name="p_fn_">
|
6458
6537
|
<xsl:call-template name="get_fn_list"/>
|
6459
|
-
<!-- <xsl:choose>
|
6460
|
-
<xsl:when test="$namespace = 'jis'">
|
6461
|
-
<xsl:call-template name="get_fn_list_for_element"/>
|
6462
|
-
</xsl:when>
|
6463
|
-
<xsl:otherwise>
|
6464
|
-
<xsl:call-template name="get_fn_list"/>
|
6465
|
-
</xsl:otherwise>
|
6466
|
-
</xsl:choose> -->
|
6467
6538
|
</xsl:variable>
|
6468
6539
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
6469
6540
|
|
6470
6541
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
6471
|
-
|
6472
|
-
<xsl:variable name="reference_">
|
6473
|
-
<xsl:value-of select="@reference"/>
|
6474
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
6475
|
-
</xsl:variable>
|
6476
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
6542
|
+
|
6477
6543
|
<!-- fn sequence number in document -->
|
6478
|
-
<xsl:variable name="current_fn_number"
|
6479
|
-
|
6480
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
6481
|
-
<xsl:otherwise>
|
6482
|
-
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
6483
|
-
</xsl:otherwise>
|
6484
|
-
</xsl:choose>
|
6485
|
-
</xsl:variable>
|
6544
|
+
<xsl:variable name="current_fn_number" select="@reference"/>
|
6545
|
+
|
6486
6546
|
<xsl:variable name="current_fn_number_text">
|
6487
6547
|
|
6488
6548
|
<xsl:value-of select="$current_fn_number"/>
|
6489
6549
|
|
6490
6550
|
</xsl:variable>
|
6491
6551
|
|
6492
|
-
<xsl:variable name="ref_id"
|
6493
|
-
|
6494
|
-
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
6495
|
-
<xsl:otherwise>
|
6496
|
-
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
6497
|
-
</xsl:otherwise>
|
6498
|
-
</xsl:choose>
|
6499
|
-
</xsl:variable>
|
6552
|
+
<xsl:variable name="ref_id" select="@target"/>
|
6553
|
+
|
6500
6554
|
<xsl:variable name="footnote_inline">
|
6501
6555
|
<fo:inline role="Reference">
|
6502
6556
|
|
@@ -6541,7 +6595,9 @@
|
|
6541
6595
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
6542
6596
|
<xsl:copy-of select="$footnote_inline"/>
|
6543
6597
|
</xsl:when>
|
6598
|
+
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
6544
6599
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
6600
|
+
|
6545
6601
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
6546
6602
|
<xsl:copy-of select="$footnote_inline"/>
|
6547
6603
|
<fo:footnote-body role="Note">
|
@@ -6558,7 +6614,10 @@
|
|
6558
6614
|
<xsl:value-of select="$current_fn_number_text"/>
|
6559
6615
|
|
6560
6616
|
</fo:inline>
|
6561
|
-
<xsl:apply-templates/>
|
6617
|
+
<!-- <xsl:apply-templates /> -->
|
6618
|
+
<!-- <ref_id><xsl:value-of select="$ref_id"/></ref_id>
|
6619
|
+
<here><xsl:copy-of select="$footnotes"/></here> -->
|
6620
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
|
6562
6621
|
</xsl:variable>
|
6563
6622
|
|
6564
6623
|
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
@@ -6612,81 +6671,138 @@
|
|
6612
6671
|
</xsl:choose>
|
6613
6672
|
</xsl:template>
|
6614
6673
|
|
6615
|
-
<xsl:template name="get_fn_list_for_element">
|
6616
|
-
<xsl:choose>
|
6617
|
-
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
6618
|
-
<fn gen_id="{generate-id(.)}">
|
6619
|
-
<xsl:copy-of select="@*"/>
|
6620
|
-
<xsl:copy-of select="node()"/>
|
6621
|
-
</fn>
|
6622
|
-
</xsl:when>
|
6623
|
-
<xsl:otherwise>
|
6624
|
-
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
6625
|
-
<xsl:variable name="element_id" select="@id"/>
|
6626
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
6627
|
-
<!-- copy unique fn -->
|
6628
|
-
<fn gen_id="{generate-id(.)}">
|
6629
|
-
<xsl:copy-of select="@*"/>
|
6630
|
-
<xsl:copy-of select="node()"/>
|
6631
|
-
</fn>
|
6632
|
-
</xsl:for-each>
|
6633
|
-
</xsl:for-each>
|
6634
|
-
</xsl:otherwise>
|
6635
|
-
</xsl:choose>
|
6636
|
-
</xsl:template>
|
6637
6674
|
<!-- ============================ -->
|
6638
6675
|
<!-- table's footnotes rendering -->
|
6639
6676
|
<!-- ============================ -->
|
6640
|
-
<xsl:template name="table_fn_display">
|
6641
|
-
<xsl:variable name="references">
|
6642
6677
|
|
6678
|
+
<!-- table/fmt-footnote-container -->
|
6679
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'fmt-footnote-container']"/>
|
6680
|
+
|
6681
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'fmt-footnote-container']">
|
6682
|
+
<xsl:for-each select=".">
|
6683
|
+
<xsl:call-template name="table_fn_display"/>
|
6684
|
+
</xsl:for-each>
|
6685
|
+
</xsl:template>
|
6686
|
+
|
6687
|
+
<xsl:template name="table_fn_display">
|
6688
|
+
<!-- <xsl:variable name="references">
|
6689
|
+
<xsl:if test="$namespace = 'bsi'">
|
6690
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) = 'name']">
|
6691
|
+
<xsl:call-template name="create_fn" />
|
6692
|
+
</xsl:for-each>
|
6693
|
+
</xsl:if>
|
6643
6694
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
6644
|
-
<xsl:call-template name="create_fn"/>
|
6695
|
+
<xsl:call-template name="create_fn" />
|
6645
6696
|
</xsl:for-each>
|
6646
|
-
</xsl:variable>
|
6647
|
-
|
6648
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
6697
|
+
</xsl:variable> -->
|
6698
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn">
|
6649
6699
|
<xsl:variable name="reference" select="@reference"/>
|
6650
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
6700
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
6701
|
+
<xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
6651
6702
|
|
6652
6703
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
6704
|
+
<xsl:copy-of select="@id"/>
|
6653
6705
|
<xsl:call-template name="refine_table-fn-style"/>
|
6654
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
6655
|
-
<xsl:call-template name="refine_table-fn-number-style"/>
|
6656
|
-
|
6657
|
-
<xsl:value-of select="@reference"/>
|
6658
6706
|
|
6659
|
-
|
6660
|
-
|
6661
|
-
|
6662
|
-
</xsl:if> -->
|
6707
|
+
<xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
|
6708
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
6709
|
+
</xsl:apply-templates>
|
6663
6710
|
|
6664
|
-
</fo:inline>
|
6665
6711
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
6666
|
-
<xsl:copy-of select="./node()"/>
|
6712
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
6713
|
+
<xsl:apply-templates/>
|
6667
6714
|
</fo:inline>
|
6668
6715
|
|
6669
6716
|
</fo:block>
|
6670
6717
|
|
6671
|
-
</xsl:if>
|
6718
|
+
<!-- </xsl:if> -->
|
6672
6719
|
</xsl:for-each>
|
6673
6720
|
</xsl:template> <!-- table_fn_display -->
|
6674
6721
|
|
6722
|
+
<!-- fmt-fn-body/fmt-fn-label in text -->
|
6723
|
+
<xsl:template match="*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"/>
|
6724
|
+
|
6725
|
+
<!-- table//fmt-fn-body//fmt-fn-label -->
|
6726
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
6727
|
+
<xsl:param name="process">false</xsl:param>
|
6728
|
+
<xsl:if test="$process = 'true'">
|
6729
|
+
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
6730
|
+
|
6731
|
+
<!-- tab is padding-right -->
|
6732
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
6733
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
6734
|
+
</xsl:apply-templates>
|
6735
|
+
|
6736
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
6737
|
+
<fo:inline font-style="normal">(</fo:inline>
|
6738
|
+
</xsl:if> -->
|
6739
|
+
|
6740
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6741
|
+
<xsl:text>※</xsl:text>
|
6742
|
+
</xsl:if> -->
|
6743
|
+
|
6744
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6745
|
+
<!-- <xsl:value-of select="normalize-space()"/> -->
|
6746
|
+
<xsl:apply-templates/>
|
6747
|
+
|
6748
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
6749
|
+
<fo:inline font-style="normal">)</fo:inline>
|
6750
|
+
</xsl:if> -->
|
6751
|
+
|
6752
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
6753
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
6754
|
+
<xsl:text>)</xsl:text>
|
6755
|
+
</xsl:if> -->
|
6756
|
+
|
6757
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
6758
|
+
<xsl:text>:</xsl:text>
|
6759
|
+
</xsl:if> -->
|
6760
|
+
|
6761
|
+
</fo:inline>
|
6762
|
+
</xsl:if>
|
6763
|
+
</xsl:template> <!-- fmt-fn-body//fmt-fn-label -->
|
6764
|
+
|
6765
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
6766
|
+
<xsl:param name="process">false</xsl:param>
|
6767
|
+
<xsl:if test="$process = 'true'">
|
6768
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
6769
|
+
|
6770
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
6771
|
+
|
6772
|
+
</xsl:if>
|
6773
|
+
</xsl:template>
|
6774
|
+
|
6775
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
6776
|
+
<fo:inline xsl:use-attribute-sets="table-fmt-fn-label-style" role="SKIP">
|
6777
|
+
<xsl:call-template name="refine_table-fmt-fn-label-style"/>
|
6778
|
+
<xsl:apply-templates/>
|
6779
|
+
</fo:inline>
|
6780
|
+
</xsl:template>
|
6781
|
+
|
6782
|
+
<!-- <xsl:template match="*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']"/> -->
|
6783
|
+
<!--
|
6675
6784
|
<xsl:template name="create_fn">
|
6676
6785
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
6677
|
-
<xsl:if test="ancestor::*[local-name()='table'][1]/@id">
|
6786
|
+
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> - for footnotes in tables -
|
6678
6787
|
<xsl:attribute name="id">
|
6679
6788
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6680
6789
|
</xsl:attribute>
|
6681
6790
|
</xsl:if>
|
6682
|
-
|
6791
|
+
<xsl:if test="$namespace = 'itu'">
|
6683
6792
|
<xsl:if test="ancestor::*[local-name()='preface']">
|
6684
6793
|
<xsl:attribute name="preface">true</xsl:attribute>
|
6685
6794
|
</xsl:if>
|
6686
|
-
|
6687
|
-
<xsl:
|
6795
|
+
</xsl:if>
|
6796
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
6797
|
+
<xsl:attribute name="id">
|
6798
|
+
<xsl:value-of select="@reference"/>
|
6799
|
+
<xsl:text>_</xsl:text>
|
6800
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
6801
|
+
</xsl:attribute>
|
6802
|
+
</xsl:if>
|
6803
|
+
<xsl:apply-templates />
|
6688
6804
|
</fn>
|
6689
|
-
</xsl:template>
|
6805
|
+
</xsl:template> -->
|
6690
6806
|
|
6691
6807
|
<!-- footnotes for table's name rendering -->
|
6692
6808
|
<xsl:template name="table_name_fn_display">
|
@@ -6705,123 +6821,171 @@
|
|
6705
6821
|
<!-- ============================ -->
|
6706
6822
|
<!-- figure's footnotes rendering -->
|
6707
6823
|
<!-- ============================ -->
|
6708
|
-
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
6709
6824
|
|
6710
|
-
|
6711
|
-
|
6712
|
-
|
6713
|
-
|
6714
|
-
|
6715
|
-
<xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
|
6825
|
+
<!-- figure/fmt-footnote-container -->
|
6826
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-footnote-container']"/>
|
6827
|
+
|
6828
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
6829
|
+
<xsl:template name="figure_fn_display">
|
6716
6830
|
|
6717
|
-
<!-- all footnotes relates to the current figure -->
|
6718
6831
|
<xsl:variable name="references">
|
6719
|
-
<xsl:for-each select="
|
6720
|
-
<
|
6721
|
-
|
6722
|
-
|
6832
|
+
<xsl:for-each select="./*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
6833
|
+
<xsl:variable name="curr_id" select="@id"/>
|
6834
|
+
<!-- <curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
6835
|
+
<curr><xsl:copy-of select="."/></curr>
|
6836
|
+
<ancestor><xsl:copy-of select="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn']]]"/></ancestor> -->
|
6837
|
+
<xsl:choose>
|
6838
|
+
<!-- skip figure/name/fn -->
|
6839
|
+
<xsl:when test="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn'][@target = $curr_id]]]"><!-- skip --></xsl:when>
|
6840
|
+
<xsl:otherwise>
|
6841
|
+
<xsl:element name="figure" namespace="{$namespace_full}">
|
6842
|
+
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
6843
|
+
<xsl:copy-of select="."/>
|
6844
|
+
</xsl:element>
|
6845
|
+
</xsl:element>
|
6846
|
+
</xsl:otherwise>
|
6847
|
+
</xsl:choose>
|
6723
6848
|
</xsl:for-each>
|
6724
6849
|
</xsl:variable>
|
6850
|
+
<!-- <references><xsl:copy-of select="$references"/></references> -->
|
6725
6851
|
|
6726
|
-
<xsl:if test="xalan:nodeset($references)
|
6852
|
+
<xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
6727
6853
|
|
6728
6854
|
<xsl:variable name="key_iso">
|
6729
6855
|
|
6730
6856
|
</xsl:variable>
|
6731
6857
|
|
6732
6858
|
<fo:block>
|
6859
|
+
<!-- current hierarchy is 'figure' element -->
|
6860
|
+
<xsl:variable name="following_dl_colwidths">
|
6861
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
6862
|
+
<xsl:variable name="simple-table">
|
6863
|
+
<!-- <xsl:variable name="doc_ns">
|
6864
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
6865
|
+
</xsl:variable>
|
6866
|
+
<xsl:variable name="ns">
|
6867
|
+
<xsl:choose>
|
6868
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
6869
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
6870
|
+
</xsl:when>
|
6871
|
+
<xsl:otherwise>
|
6872
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
6873
|
+
</xsl:otherwise>
|
6874
|
+
</xsl:choose>
|
6875
|
+
</xsl:variable> -->
|
6733
6876
|
|
6734
|
-
|
6735
|
-
|
6736
|
-
|
6737
|
-
|
6738
|
-
|
6739
|
-
|
6740
|
-
</xsl:variable>
|
6741
|
-
<xsl:variable name="ns">
|
6742
|
-
<xsl:choose>
|
6743
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
6744
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
6745
|
-
</xsl:when>
|
6746
|
-
<xsl:otherwise>
|
6747
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
6748
|
-
</xsl:otherwise>
|
6749
|
-
</xsl:choose>
|
6750
|
-
</xsl:variable> -->
|
6877
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
6878
|
+
<tbody>
|
6879
|
+
<xsl:apply-templates mode="dl"/>
|
6880
|
+
</tbody>
|
6881
|
+
</xsl:for-each>
|
6882
|
+
</xsl:variable>
|
6751
6883
|
|
6752
|
-
|
6753
|
-
|
6754
|
-
|
6755
|
-
|
6756
|
-
</xsl:for-each>
|
6757
|
-
</xsl:variable>
|
6884
|
+
<xsl:call-template name="calculate-column-widths">
|
6885
|
+
<xsl:with-param name="cols-count" select="2"/>
|
6886
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
6887
|
+
</xsl:call-template>
|
6758
6888
|
|
6759
|
-
|
6760
|
-
|
6761
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
6762
|
-
</xsl:call-template>
|
6889
|
+
</xsl:if>
|
6890
|
+
</xsl:variable>
|
6763
6891
|
|
6764
|
-
|
6765
|
-
|
6892
|
+
<xsl:variable name="maxlength_dt">
|
6893
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
6894
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
6895
|
+
</xsl:for-each>
|
6896
|
+
</xsl:variable>
|
6766
6897
|
|
6767
|
-
|
6768
|
-
|
6769
|
-
|
6770
|
-
</xsl:for-each>
|
6771
|
-
</xsl:variable>
|
6898
|
+
<fo:table width="95%" table-layout="fixed">
|
6899
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6900
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
6772
6901
|
|
6773
|
-
|
6774
|
-
|
6775
|
-
|
6902
|
+
</xsl:if>
|
6903
|
+
<xsl:choose>
|
6904
|
+
<!-- if there 'dl', then set same columns width -->
|
6905
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
6906
|
+
<xsl:call-template name="setColumnWidth_dl">
|
6907
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
6908
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
6909
|
+
</xsl:call-template>
|
6910
|
+
</xsl:when>
|
6911
|
+
<xsl:otherwise>
|
6912
|
+
<fo:table-column column-width="5%"/>
|
6913
|
+
<fo:table-column column-width="95%"/>
|
6914
|
+
</xsl:otherwise>
|
6915
|
+
</xsl:choose>
|
6916
|
+
<fo:table-body>
|
6917
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn"> -->
|
6918
|
+
<xsl:for-each select="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
6776
6919
|
|
6777
|
-
|
6778
|
-
<xsl:
|
6779
|
-
|
6780
|
-
|
6781
|
-
|
6782
|
-
|
6783
|
-
|
6784
|
-
|
6785
|
-
|
6786
|
-
|
6787
|
-
<fo:table-column column-width="5%"/>
|
6788
|
-
<fo:table-column column-width="95%"/>
|
6789
|
-
</xsl:otherwise>
|
6790
|
-
</xsl:choose>
|
6791
|
-
<fo:table-body>
|
6792
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
6793
|
-
<xsl:variable name="reference" select="@reference"/>
|
6794
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
6795
|
-
<fo:table-row>
|
6796
|
-
<fo:table-cell>
|
6797
|
-
<fo:block>
|
6798
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
|
6799
|
-
<xsl:value-of select="@reference"/>
|
6920
|
+
<xsl:variable name="reference" select="@reference"/>
|
6921
|
+
<!-- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
6922
|
+
<fo:table-row>
|
6923
|
+
<fo:table-cell>
|
6924
|
+
<fo:block>
|
6925
|
+
|
6926
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
|
6927
|
+
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
6928
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6929
|
+
<xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
|
6800
6930
|
</fo:inline>
|
6801
|
-
</fo:block>
|
6802
|
-
</fo:table-cell>
|
6803
|
-
<fo:table-cell>
|
6804
|
-
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
6805
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6806
6931
|
|
6807
|
-
|
6932
|
+
</fo:block>
|
6933
|
+
</fo:table-cell>
|
6934
|
+
<fo:table-cell>
|
6935
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
6936
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
6808
6937
|
|
6809
|
-
|
6810
|
-
|
6811
|
-
|
6812
|
-
</fo:table-cell>
|
6813
|
-
</fo:table-row>
|
6814
|
-
</xsl:if>
|
6815
|
-
</xsl:for-each>
|
6816
|
-
</fo:table-body>
|
6817
|
-
</fo:table>
|
6938
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
6939
|
+
|
6940
|
+
</xsl:if>
|
6818
6941
|
|
6942
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
6943
|
+
<xsl:apply-templates/>
|
6944
|
+
</fo:block>
|
6945
|
+
</fo:table-cell>
|
6946
|
+
</fo:table-row>
|
6947
|
+
<!-- </xsl:if> -->
|
6948
|
+
</xsl:for-each>
|
6949
|
+
</fo:table-body>
|
6950
|
+
</fo:table>
|
6819
6951
|
</fo:block>
|
6820
6952
|
</xsl:if>
|
6821
|
-
</xsl:template> <!--
|
6953
|
+
</xsl:template> <!-- figure_fn_display -->
|
6954
|
+
|
6955
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
6956
|
+
<xsl:param name="process">false</xsl:param>
|
6957
|
+
<xsl:if test="$process = 'true'">
|
6958
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
6959
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
6960
|
+
|
6961
|
+
<!-- tab is padding-right -->
|
6962
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
6963
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
6964
|
+
</xsl:apply-templates>
|
6965
|
+
|
6966
|
+
<xsl:apply-templates/>
|
6967
|
+
|
6968
|
+
</fo:inline>
|
6969
|
+
</xsl:if>
|
6970
|
+
</xsl:template> <!-- figure//fmt-fn-body//fmt-fn-label -->
|
6971
|
+
|
6972
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
6973
|
+
<xsl:param name="process">false</xsl:param>
|
6974
|
+
<xsl:if test="$process = 'true'">
|
6975
|
+
|
6976
|
+
</xsl:if>
|
6977
|
+
</xsl:template>
|
6978
|
+
|
6979
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
6980
|
+
<fo:inline xsl:use-attribute-sets="figure-fmt-fn-label-style" role="SKIP">
|
6981
|
+
<xsl:call-template name="refine_figure-fmt-fn-label-style"/>
|
6982
|
+
<xsl:apply-templates/>
|
6983
|
+
</fo:inline>
|
6984
|
+
</xsl:template>
|
6822
6985
|
|
6823
6986
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
6824
6987
|
<!-- figure's footnote label -->
|
6988
|
+
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
6825
6989
|
<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">
|
6826
6990
|
<xsl:variable name="key_iso">
|
6827
6991
|
|
@@ -6830,7 +6994,7 @@
|
|
6830
6994
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
6831
6995
|
|
6832
6996
|
</xsl:if>
|
6833
|
-
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
6997
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
6834
6998
|
<!-- <xsl:value-of select="@reference"/> -->
|
6835
6999
|
<xsl:apply-templates/>
|
6836
7000
|
</fo:inline>
|
@@ -6840,38 +7004,65 @@
|
|
6840
7004
|
<!-- END: figure's footnotes rendering -->
|
6841
7005
|
<!-- ============================ -->
|
6842
7006
|
|
6843
|
-
<!-- fn reference in the
|
7007
|
+
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
7008
|
+
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
6844
7009
|
<xsl:template match="*[local-name()='fn']">
|
6845
7010
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
6846
7011
|
|
6847
7012
|
<xsl:call-template name="refine_fn-reference-style"/>
|
6848
7013
|
|
6849
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
6850
|
-
|
6851
|
-
|
7014
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
7015
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
7016
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
7017
|
+
<!-- <xsl:attribute name="internal-destination">
|
6852
7018
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
6853
7019
|
</xsl:attribute>
|
6854
7020
|
</xsl:if>
|
7021
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
7022
|
+
<xsl:attribute name="internal-destination">
|
7023
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
7024
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
7025
|
+
</xsl:attribute>
|
7026
|
+
</xsl:if> -->
|
7027
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
7028
|
+
<xsl:text>※</xsl:text>
|
7029
|
+
</xsl:if> -->
|
7030
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
6855
7031
|
|
6856
|
-
|
7032
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
6857
7033
|
|
7034
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
7035
|
+
<xsl:text>)</xsl:text>
|
7036
|
+
</xsl:if> -->
|
6858
7037
|
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
6859
7038
|
<!-- <xsl:if test="$namespace = 'jis'">
|
6860
7039
|
<fo:inline font-weight="normal">)</fo:inline>
|
6861
7040
|
</xsl:if> -->
|
6862
7041
|
</fo:basic-link>
|
6863
7042
|
</fo:inline>
|
6864
|
-
</xsl:template>
|
7043
|
+
</xsl:template> <!-- fn -->
|
6865
7044
|
|
7045
|
+
<!-- fn/text() -->
|
6866
7046
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
6867
7047
|
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
6868
7048
|
</xsl:template>
|
6869
7049
|
|
6870
|
-
|
7050
|
+
<!-- fn//p fmt-fn-body//p -->
|
7051
|
+
<xsl:template match="*[local-name()='fn']//*[local-name()='p'] | *[local-name() = 'fmt-fn-body']//*[local-name()='p']">
|
6871
7052
|
<fo:inline role="P">
|
6872
7053
|
<xsl:apply-templates/>
|
6873
7054
|
</fo:inline>
|
6874
7055
|
</xsl:template>
|
7056
|
+
|
7057
|
+
<xsl:template name="insertFootnoteSeparatorCommon">
|
7058
|
+
<xsl:param name="leader_length">30%</xsl:param>
|
7059
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
7060
|
+
<fo:block>
|
7061
|
+
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
7062
|
+
</fo:block>
|
7063
|
+
</fo:static-content>
|
7064
|
+
</xsl:template>
|
7065
|
+
|
6875
7066
|
<!-- ===================== -->
|
6876
7067
|
<!-- END Footnotes processing -->
|
6877
7068
|
<!-- ===================== -->
|
@@ -7182,11 +7373,11 @@
|
|
7182
7373
|
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
7183
7374
|
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
7184
7375
|
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7376
|
+
<xsl:call-template name="setColumnWidth_dl">
|
7377
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
7378
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
7379
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
7380
|
+
</xsl:call-template>
|
7190
7381
|
|
7191
7382
|
<fo:table-body>
|
7192
7383
|
|
@@ -7220,6 +7411,14 @@
|
|
7220
7411
|
|
7221
7412
|
</xsl:template> <!-- END: dl -->
|
7222
7413
|
|
7414
|
+
<xsl:template match="@*|node()" mode="dt_clean">
|
7415
|
+
<xsl:copy>
|
7416
|
+
<xsl:apply-templates select="@*|node()" mode="dt_clean"/>
|
7417
|
+
</xsl:copy>
|
7418
|
+
</xsl:template>
|
7419
|
+
|
7420
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="dt_clean"/>
|
7421
|
+
|
7223
7422
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
7224
7423
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
7225
7424
|
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
@@ -7255,10 +7454,12 @@
|
|
7255
7454
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
7256
7455
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
7257
7456
|
|
7457
|
+
<!-- dl/name -->
|
7258
7458
|
<xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
7259
7459
|
<xsl:param name="process">false</xsl:param>
|
7260
7460
|
<xsl:if test="$process = 'true'">
|
7261
7461
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
7462
|
+
|
7262
7463
|
<xsl:apply-templates/>
|
7263
7464
|
</fo:block>
|
7264
7465
|
</xsl:if>
|
@@ -7272,6 +7473,10 @@
|
|
7272
7473
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
7273
7474
|
|
7274
7475
|
<xsl:choose>
|
7476
|
+
<!-- <xsl:when test="@class = 'formula_dl' and local-name(..) = 'figure'">
|
7477
|
+
<fo:table-column column-width="10%"/>
|
7478
|
+
<fo:table-column column-width="90%"/>
|
7479
|
+
</xsl:when> -->
|
7275
7480
|
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
7276
7481
|
<xsl:call-template name="insertTableColumnWidth">
|
7277
7482
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -8071,7 +8276,7 @@
|
|
8071
8276
|
<xsl:choose>
|
8072
8277
|
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
8073
8278
|
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
8074
|
-
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
8279
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
8075
8280
|
</xsl:when>
|
8076
8281
|
<xsl:otherwise>
|
8077
8282
|
<xsl:apply-templates/>
|
@@ -8079,7 +8284,7 @@
|
|
8079
8284
|
</xsl:choose>
|
8080
8285
|
</xsl:template>
|
8081
8286
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
8082
|
-
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
8287
|
+
<fo:inline keep-with-next.within-line="always" role="SKIP"><xsl:value-of select="."/></fo:inline>
|
8083
8288
|
</xsl:template>
|
8084
8289
|
|
8085
8290
|
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
@@ -9119,24 +9324,26 @@
|
|
9119
9324
|
<xsl:apply-templates select="." mode="mathml"/>
|
9120
9325
|
</xsl:variable>
|
9121
9326
|
|
9122
|
-
<fo:instream-foreign-object fox:alt-text="Math">
|
9327
|
+
<fo:instream-foreign-object fox:alt-text="Math" fox:actual-text="Math">
|
9123
9328
|
|
9124
9329
|
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
9125
9330
|
|
9126
|
-
|
9127
|
-
|
9128
|
-
|
9129
|
-
<xsl:
|
9130
|
-
|
9131
|
-
|
9132
|
-
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
9133
|
-
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
9134
|
-
<!-- put Mathin Alternate Text -->
|
9135
|
-
<xsl:attribute name="fox:alt-text">
|
9136
|
-
<xsl:value-of select="$asciimath_text_"/>
|
9331
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
9332
|
+
<!-- put MathML in Actual Text -->
|
9333
|
+
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
9334
|
+
<xsl:attribute name="fox:actual-text">
|
9335
|
+
<xsl:value-of select="$mathml_content"/>
|
9137
9336
|
</xsl:attribute>
|
9337
|
+
|
9338
|
+
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
9339
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
9340
|
+
<!-- put Mathin Alternate Text -->
|
9341
|
+
<xsl:attribute name="fox:alt-text">
|
9342
|
+
<xsl:value-of select="$asciimath_text_"/>
|
9343
|
+
</xsl:attribute>
|
9344
|
+
</xsl:if>
|
9345
|
+
<!-- </xsl:if> -->
|
9138
9346
|
</xsl:if>
|
9139
|
-
<!-- </xsl:if> -->
|
9140
9347
|
|
9141
9348
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
9142
9349
|
|
@@ -9399,6 +9606,27 @@
|
|
9399
9606
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
9400
9607
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
9401
9608
|
</xsl:when> -->
|
9609
|
+
|
9610
|
+
<!-- <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'))">
|
9611
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
9612
|
+
<xsl:variable name="filename">
|
9613
|
+
<xsl:call-template name="substring-after-last">
|
9614
|
+
<xsl:with-param name="value" select="$target_"/>
|
9615
|
+
<xsl:with-param name="delimiter" select="'/'"/>
|
9616
|
+
</xsl:call-template>
|
9617
|
+
</xsl:variable>
|
9618
|
+
<xsl:variable name="target_filepath" select="concat($inputxml_basepath, @target)"/>
|
9619
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($target_filepath)))"/>
|
9620
|
+
<xsl:choose>
|
9621
|
+
<xsl:when test="$file_exists = 'true'">
|
9622
|
+
<xsl:value-of select="concat('url(embedded-file:', $filename, ')')"/>
|
9623
|
+
</xsl:when>
|
9624
|
+
<xsl:otherwise>
|
9625
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
9626
|
+
</xsl:otherwise>
|
9627
|
+
</xsl:choose>
|
9628
|
+
</xsl:when> -->
|
9629
|
+
|
9402
9630
|
<xsl:otherwise>
|
9403
9631
|
<xsl:value-of select="normalize-space(@target)"/>
|
9404
9632
|
</xsl:otherwise>
|
@@ -9707,7 +9935,7 @@
|
|
9707
9935
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
9708
9936
|
</xsl:if>
|
9709
9937
|
|
9710
|
-
</xsl:template>
|
9938
|
+
</xsl:template> <!-- refine_note_block_style -->
|
9711
9939
|
|
9712
9940
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
9713
9941
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
@@ -9899,10 +10127,21 @@
|
|
9899
10127
|
</xsl:template>
|
9900
10128
|
|
9901
10129
|
<xsl:template name="showFigureKey">
|
9902
|
-
<xsl:for-each select="*[local-name() = 'note'
|
9903
|
-
<xsl:
|
10130
|
+
<xsl:for-each select="*[(local-name() = 'note' and not(@type = 'units')) or local-name() = 'example']">
|
10131
|
+
<xsl:choose>
|
10132
|
+
<xsl:when test="local-name() = 'note'">
|
10133
|
+
<xsl:call-template name="note"/>
|
10134
|
+
</xsl:when>
|
10135
|
+
<xsl:when test="local-name() = 'example'">
|
10136
|
+
<xsl:call-template name="example"/>
|
10137
|
+
</xsl:when>
|
10138
|
+
<xsl:otherwise>
|
10139
|
+
<xsl:apply-templates select="."/>
|
10140
|
+
</xsl:otherwise>
|
10141
|
+
</xsl:choose>
|
9904
10142
|
</xsl:for-each>
|
9905
|
-
|
10143
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
10144
|
+
<xsl:call-template name="figure_fn_display"/>
|
9906
10145
|
</xsl:template>
|
9907
10146
|
|
9908
10147
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -10796,10 +11035,10 @@
|
|
10796
11035
|
<xsl:when test="@type = 'section-title'">
|
10797
11036
|
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
10798
11037
|
<xsl:text>: </xsl:text>
|
10799
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
11038
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
10800
11039
|
</xsl:when>
|
10801
11040
|
<xsl:otherwise>
|
10802
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
11041
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
10803
11042
|
</xsl:otherwise>
|
10804
11043
|
</xsl:choose>
|
10805
11044
|
</xsl:when>
|
@@ -10864,6 +11103,8 @@
|
|
10864
11103
|
<xsl:template match="*[local-name() = 'origin']" mode="contents"/>
|
10865
11104
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="contents"/>
|
10866
11105
|
|
11106
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="contents" priority="3"/>
|
11107
|
+
|
10867
11108
|
<xsl:template match="*[local-name() = 'stem']" mode="bookmarks"/>
|
10868
11109
|
<xsl:template match="*[local-name() = 'fmt-stem']" mode="bookmarks">
|
10869
11110
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -10885,6 +11126,8 @@
|
|
10885
11126
|
<xsl:template match="*[local-name() = 'origin']" mode="bookmarks"/>
|
10886
11127
|
<xsl:template match="*[local-name() = 'erefstack ']" mode="bookmarks"/>
|
10887
11128
|
|
11129
|
+
<xsl:template match="*[local-name() = 'requirement'] | *[local-name() = 'recommendation'] | *[local-name() = 'permission']" mode="bookmarks" priority="3"/>
|
11130
|
+
|
10888
11131
|
<!-- Bookmarks -->
|
10889
11132
|
<xsl:template name="addBookmarks">
|
10890
11133
|
<xsl:param name="contents"/>
|
@@ -11130,9 +11373,15 @@
|
|
11130
11373
|
</xsl:if>
|
11131
11374
|
</xsl:template>
|
11132
11375
|
|
11376
|
+
<!-- figure/fn -->
|
11133
11377
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
11134
|
-
|
11378
|
+
<!-- figure/note -->
|
11379
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
11380
|
+
<!-- figure/example -->
|
11381
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
11135
11382
|
|
11383
|
+
<!-- figure/note[@type = 'units'] -->
|
11384
|
+
<!-- image/note[@type = 'units'] -->
|
11136
11385
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
11137
11386
|
<fo:block text-align="right" keep-with-next="always">
|
11138
11387
|
<xsl:apply-templates/>
|
@@ -11253,6 +11502,7 @@
|
|
11253
11502
|
</xsl:choose>
|
11254
11503
|
</xsl:template>
|
11255
11504
|
|
11505
|
+
<!-- fn -->
|
11256
11506
|
<xsl:template match="*[local-name() = 'fn']" mode="contents"/>
|
11257
11507
|
<xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/>
|
11258
11508
|
|
@@ -12150,7 +12400,7 @@
|
|
12150
12400
|
text line 1
|
12151
12401
|
text line 2
|
12152
12402
|
-->
|
12153
|
-
<xsl:template match="*[local-name() = 'example']">
|
12403
|
+
<xsl:template match="*[local-name() = 'example']" name="example">
|
12154
12404
|
|
12155
12405
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
12156
12406
|
|
@@ -12256,6 +12506,7 @@
|
|
12256
12506
|
|
12257
12507
|
</xsl:template>
|
12258
12508
|
|
12509
|
+
<!-- example/name -->
|
12259
12510
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
12260
12511
|
<xsl:param name="fo_element">block</xsl:param>
|
12261
12512
|
|
@@ -12281,7 +12532,8 @@
|
|
12281
12532
|
|
12282
12533
|
</xsl:template>
|
12283
12534
|
|
12284
|
-
|
12535
|
+
<!-- table/example/name, table/tfoot//example/name -->
|
12536
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
|
12285
12537
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
12286
12538
|
|
12287
12539
|
<xsl:apply-templates/>
|
@@ -12752,21 +13004,32 @@
|
|
12752
13004
|
<!-- ========== -->
|
12753
13005
|
|
12754
13006
|
<xsl:variable name="reviews_">
|
12755
|
-
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
13007
|
+
<xsl:for-each select="//*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])][@from]">
|
12756
13008
|
<xsl:copy>
|
12757
13009
|
<xsl:copy-of select="@from"/>
|
12758
13010
|
<xsl:copy-of select="@id"/>
|
12759
13011
|
</xsl:copy>
|
12760
13012
|
</xsl:for-each>
|
13013
|
+
<xsl:for-each select="//*[local-name() = 'fmt-review-start'][@source]">
|
13014
|
+
<xsl:copy>
|
13015
|
+
<xsl:copy-of select="@source"/>
|
13016
|
+
<xsl:copy-of select="@id"/>
|
13017
|
+
</xsl:copy>
|
13018
|
+
</xsl:for-each>
|
12761
13019
|
</xsl:variable>
|
12762
13020
|
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
12763
13021
|
|
12764
13022
|
<xsl:template name="addReviewHelper">
|
12765
|
-
|
12766
|
-
|
12767
|
-
|
12768
|
-
|
12769
|
-
<
|
13023
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
13024
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
13025
|
+
<xsl:variable name="curr_id" select="@id"/>
|
13026
|
+
<!-- <xsl:variable name="review_id" select="normalize-space(/@id)"/> -->
|
13027
|
+
<xsl:for-each select="$reviews//*[local-name() = 'review'][@from = $curr_id]"> <!-- $reviews//*[local-name() = 'fmt-review-start'][@source = $curr_id] -->
|
13028
|
+
<xsl:variable name="review_id" select="normalize-space(@id)"/>
|
13029
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
13030
|
+
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13031
|
+
</xsl:if>
|
13032
|
+
</xsl:for-each>
|
12770
13033
|
</xsl:if>
|
12771
13034
|
<!-- <fo:block>
|
12772
13035
|
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
@@ -12914,14 +13177,61 @@
|
|
12914
13177
|
|
12915
13178
|
</xsl:template>
|
12916
13179
|
|
12917
|
-
|
13180
|
+
<!-- document text (not figures, or tables) footnotes -->
|
13181
|
+
<xsl:variable name="reviews_container_">
|
13182
|
+
<xsl:for-each select="//*[local-name() = 'review-container']/*[local-name() = 'fmt-review-body']">
|
13183
|
+
<xsl:variable name="update_xml_step1">
|
13184
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
13185
|
+
</xsl:variable>
|
13186
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
13187
|
+
</xsl:for-each>
|
13188
|
+
</xsl:variable>
|
13189
|
+
<xsl:variable name="reviews_container" select="xalan:nodeset($reviews_container_)"/>
|
13190
|
+
|
13191
|
+
<xsl:template match="*[local-name() = 'review-container']"/>
|
13192
|
+
|
13193
|
+
<!-- for old Presentation XML (before https://github.com/metanorma/isodoc/issues/670) -->
|
13194
|
+
<xsl:template match="*[local-name() = 'review'][not(parent::*[local-name() = 'review-container'])]"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
13195
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
13196
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
13197
|
+
<xsl:choose>
|
13198
|
+
<!-- if there isn't the attribute '@from', then -->
|
13199
|
+
<xsl:when test="$id_from = ''">
|
13200
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13201
|
+
</xsl:when>
|
13202
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
13203
|
+
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
13204
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13205
|
+
</xsl:when>
|
13206
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
13207
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13208
|
+
</xsl:when>
|
13209
|
+
</xsl:choose>
|
13210
|
+
</xsl:if>
|
13211
|
+
</xsl:template>
|
13212
|
+
|
13213
|
+
<!-- for new Presentation XML (https://github.com/metanorma/isodoc/issues/670) -->
|
13214
|
+
<xsl:template match="*[local-name() = 'fmt-review-start']" name="fmt-review-start"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
12918
13215
|
<!-- comment 2019-11-29 -->
|
12919
13216
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
12920
13217
|
<xsl:apply-templates /> -->
|
12921
13218
|
|
12922
|
-
<xsl:variable name="id_from" select="normalize-space(current()/@
|
13219
|
+
<xsl:variable name="id_from" select="normalize-space(current()/@source)"/>
|
12923
13220
|
|
12924
|
-
<xsl:
|
13221
|
+
<xsl:variable name="source" select="normalize-space(@source)"/>
|
13222
|
+
|
13223
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
13224
|
+
<!-- <xsl:variable name="id_from" select="normalize-space(current()/@from)"/> -->
|
13225
|
+
|
13226
|
+
<!-- <xsl:if test="@source = @end"> -->
|
13227
|
+
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
13228
|
+
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
13229
|
+
<!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
|
13230
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
13231
|
+
<!-- </xsl:if> -->
|
13232
|
+
</xsl:if>
|
13233
|
+
|
13234
|
+
<xsl:if test="1 = 2">
|
12925
13235
|
<xsl:choose>
|
12926
13236
|
<!-- if there isn't the attribute '@from', then -->
|
12927
13237
|
<xsl:when test="$id_from = ''">
|
@@ -12929,10 +13239,10 @@
|
|
12929
13239
|
</xsl:when>
|
12930
13240
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
12931
13241
|
<xsl:when test="ancestor::*[local-name() = 'metanorma'] and not(ancestor::*[local-name() = 'metanorma']//*[@id = $id_from])">
|
12932
|
-
<fo:block id="{
|
13242
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12933
13243
|
</xsl:when>
|
12934
13244
|
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
12935
|
-
<fo:block id="{
|
13245
|
+
<fo:block id="{$id_from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$id_from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
12936
13246
|
</xsl:when>
|
12937
13247
|
</xsl:choose>
|
12938
13248
|
</xsl:if>
|
@@ -12983,16 +13293,21 @@
|
|
12983
13293
|
<xsl:variable name="list_level">
|
12984
13294
|
<xsl:choose>
|
12985
13295
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
12986
|
-
<xsl:
|
13296
|
+
<xsl:when test="$ul_labels/label[@level = 3]"><xsl:value-of select="$list_level_ mod 3"/></xsl:when>
|
13297
|
+
<xsl:when test="$list_level_ mod 2 = 0">2</xsl:when>
|
13298
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 2"/></xsl:otherwise>
|
12987
13299
|
</xsl:choose>
|
12988
13300
|
</xsl:variable>
|
12989
13301
|
<xsl:choose>
|
12990
13302
|
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
12991
13303
|
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
12992
13304
|
</xsl:when>
|
12993
|
-
<xsl:when test="$list_level mod 3 = 0">
|
13305
|
+
<xsl:when test="$list_level mod 3 = 0 and $ul_labels/label[@level = 3]">
|
12994
13306
|
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
12995
13307
|
</xsl:when>
|
13308
|
+
<xsl:when test="$list_level mod 3 = 0">
|
13309
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
13310
|
+
</xsl:when>
|
12996
13311
|
<xsl:when test="$list_level mod 2 = 0">
|
12997
13312
|
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
12998
13313
|
</xsl:when>
|
@@ -13535,10 +13850,22 @@
|
|
13535
13850
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'bookmark']" priority="2"/>
|
13536
13851
|
|
13537
13852
|
<xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
13538
|
-
|
13539
|
-
<
|
13540
|
-
|
13541
|
-
|
13853
|
+
<xsl:variable name="bookmark_id" select="@id"/>
|
13854
|
+
<xsl:choose>
|
13855
|
+
<!-- Example:
|
13856
|
+
<fmt-review-start id="_7ef81cf7-3f6c-4ed4-9c1f-1ba092052bbd" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" end="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/>
|
13857
|
+
<bookmark id="_dda23915-8574-ef1e-29a1-822d465a5b97"/>
|
13858
|
+
<fmt-review-end id="_f336a8d0-08a8-4b7f-a1aa-b04688ed40c1" source="_dda23915-8574-ef1e-29a1-822d465a5b97" target="_ecfb2210-3b1b-46a2-b63a-8b8505be6686" start="_dda23915-8574-ef1e-29a1-822d465a5b97" author="" date="2025-03-24T00:00:00Z"/> -->
|
13859
|
+
<xsl:when test="1 = 2 and preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]">
|
13860
|
+
<!-- skip here, see the template 'fmt-review-start' -->
|
13861
|
+
</xsl:when>
|
13862
|
+
<xsl:otherwise>
|
13863
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
13864
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[local-name() = 'fmt-review-start'][@source = $bookmark_id] and following-sibling::node()[local-name() = 'fmt-review-end'][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
13865
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
13866
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
13867
|
+
</xsl:otherwise>
|
13868
|
+
</xsl:choose>
|
13542
13869
|
</xsl:template>
|
13543
13870
|
<!-- =================== -->
|
13544
13871
|
<!-- End of Index processing -->
|
@@ -13958,8 +14285,33 @@
|
|
13958
14285
|
|
13959
14286
|
<xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
13960
14287
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14288
|
+
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14289
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
14290
|
+
|
13961
14291
|
<xsl:variable name="target" select="@target"/>
|
14292
|
+
|
13962
14293
|
<xsl:for-each select="*[local-name() = 'tab']">
|
14294
|
+
|
14295
|
+
<xsl:if test="position() = 1">
|
14296
|
+
<!-- first column (data before first `tab`) -->
|
14297
|
+
<fo:table-cell>
|
14298
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
14299
|
+
<xsl:call-template name="insert_basic_link">
|
14300
|
+
<xsl:with-param name="element">
|
14301
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
14302
|
+
<xsl:for-each select="preceding-sibling::node()">
|
14303
|
+
<xsl:choose>
|
14304
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14305
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
14306
|
+
</xsl:choose>
|
14307
|
+
</xsl:for-each>
|
14308
|
+
</fo:basic-link>
|
14309
|
+
</xsl:with-param>
|
14310
|
+
</xsl:call-template>
|
14311
|
+
</fo:block>
|
14312
|
+
</fo:table-cell>
|
14313
|
+
</xsl:if>
|
14314
|
+
|
13963
14315
|
<xsl:variable name="current_id" select="generate-id()"/>
|
13964
14316
|
<fo:table-cell>
|
13965
14317
|
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
@@ -14010,11 +14362,25 @@
|
|
14010
14362
|
|
14011
14363
|
<xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
14012
14364
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14365
|
+
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
14013
14366
|
<xsl:for-each select="*[local-name() = 'tab']">
|
14367
|
+
<xsl:if test="position() = 1">
|
14368
|
+
<td>
|
14369
|
+
<xsl:for-each select="preceding-sibling::node()">
|
14370
|
+
<xsl:choose>
|
14371
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14372
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
14373
|
+
</xsl:choose>
|
14374
|
+
</xsl:for-each>
|
14375
|
+
</td>
|
14376
|
+
</xsl:if>
|
14014
14377
|
<xsl:variable name="current_id" select="generate-id()"/>
|
14015
14378
|
<td>
|
14016
14379
|
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
14017
|
-
<xsl:
|
14380
|
+
<xsl:choose>
|
14381
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
14382
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
14383
|
+
</xsl:choose>
|
14018
14384
|
</xsl:for-each>
|
14019
14385
|
</td>
|
14020
14386
|
</xsl:for-each>
|
@@ -14885,6 +15251,9 @@
|
|
14885
15251
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_step1"/>
|
14886
15252
|
<xsl:template match="*[local-name() = 'svgmap']" mode="update_xml_pres"/>
|
14887
15253
|
|
15254
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_step1"/>
|
15255
|
+
<xsl:template match="*[local-name() = 'review-container']" mode="update_xml_pres"/>
|
15256
|
+
|
14888
15257
|
<!-- END: update new Presentation XML -->
|
14889
15258
|
|
14890
15259
|
<!-- =========================================================================== -->
|
@@ -15408,6 +15777,7 @@
|
|
15408
15777
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
15409
15778
|
</fn>
|
15410
15779
|
-->
|
15780
|
+
<!-- fn in text -->
|
15411
15781
|
<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">
|
15412
15782
|
<xsl:variable name="p_fn_">
|
15413
15783
|
<xsl:call-template name="get_fn_list"/>
|