metanorma-bipm 2.6.1 → 2.6.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/bipm/bipm.brochure.xsl +532 -223
- data/lib/isodoc/bipm/bipm.guide.xsl +532 -223
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +532 -223
- data/lib/isodoc/bipm/bipm.rapport.xsl +532 -223
- data/lib/isodoc/bipm/jcgm.standard.xsl +474 -222
- data/lib/isodoc/bipm/presentation_xml_convert.rb +33 -3
- data/lib/metanorma/bipm/isodoc.rng +9 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -801,16 +801,6 @@
|
|
801
801
|
</xsl:if>
|
802
802
|
</xsl:template>
|
803
803
|
|
804
|
-
<xsl:template match="*[local-name()='p']/*[local-name()='fn']/*[local-name()='p']">
|
805
|
-
<xsl:apply-templates/>
|
806
|
-
</xsl:template>
|
807
|
-
|
808
|
-
<xsl:template match="jcgm:fn/jcgm:p">
|
809
|
-
<fo:block>
|
810
|
-
<xsl:apply-templates/>
|
811
|
-
</fo:block>
|
812
|
-
</xsl:template>
|
813
|
-
|
814
804
|
<!-- for two-columns layout -->
|
815
805
|
|
816
806
|
<xsl:template match="*[local-name()='ul'][not(*)] | *[local-name()='ol'][not(*)]" priority="2"/>
|
@@ -1023,11 +1013,9 @@
|
|
1023
1013
|
|
1024
1014
|
<xsl:template name="insertHeaderFooter">
|
1025
1015
|
<xsl:param name="isDraft"/>
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
</fo:block>
|
1030
|
-
</fo:static-content>
|
1016
|
+
|
1017
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
1018
|
+
|
1031
1019
|
<fo:static-content flow-name="header-even-jcgm" role="artifact">
|
1032
1020
|
<xsl:call-template name="insertDraftWatermark">
|
1033
1021
|
<xsl:with-param name="isDraft" select="$isDraft"/>
|
@@ -2787,14 +2775,18 @@
|
|
2787
2775
|
</xsl:template>
|
2788
2776
|
|
2789
2777
|
<xsl:attribute-set name="table-fn-number-style">
|
2778
|
+
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
2779
|
+
|
2780
|
+
</xsl:attribute-set> <!-- table-fn-number-style -->
|
2781
|
+
|
2782
|
+
<xsl:attribute-set name="table-fmt-fn-label-style">
|
2790
2783
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2791
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2792
2784
|
|
2793
2785
|
<xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
|
2794
2786
|
|
2795
|
-
</xsl:attribute-set> <!-- table-fn-
|
2787
|
+
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
2796
2788
|
|
2797
|
-
<xsl:template name="refine_table-fn-
|
2789
|
+
<xsl:template name="refine_table-fmt-fn-label-style">
|
2798
2790
|
|
2799
2791
|
</xsl:template>
|
2800
2792
|
|
@@ -2809,11 +2801,18 @@
|
|
2809
2801
|
</xsl:attribute-set>
|
2810
2802
|
|
2811
2803
|
<xsl:attribute-set name="figure-fn-number-style">
|
2812
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2813
2804
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
2805
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
2806
|
+
|
2807
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
2808
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
2814
2809
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2815
2810
|
|
2816
|
-
</xsl:attribute-set>
|
2811
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
2812
|
+
|
2813
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
2814
|
+
|
2815
|
+
</xsl:template>
|
2817
2816
|
|
2818
2817
|
<xsl:attribute-set name="figure-fn-body-style">
|
2819
2818
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
@@ -4337,9 +4336,13 @@
|
|
4337
4336
|
|
4338
4337
|
<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']"/>
|
4339
4338
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4340
|
-
|
4341
|
-
|
4342
|
-
|
4339
|
+
<!-- <xsl:choose>
|
4340
|
+
<xsl:when test="$namespace = 'plateau'"></xsl:when>
|
4341
|
+
<xsl:otherwise>
|
4342
|
+
|
4343
|
+
</xsl:otherwise>
|
4344
|
+
</xsl:choose> -->
|
4345
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
4343
4346
|
</xsl:if>
|
4344
4347
|
|
4345
4348
|
<xsl:choose>
|
@@ -4386,7 +4389,7 @@
|
|
4386
4389
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
4387
4390
|
</xsl:when>
|
4388
4391
|
<xsl:otherwise>
|
4389
|
-
<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 -->
|
4392
|
+
<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 -->
|
4390
4393
|
</xsl:otherwise>
|
4391
4394
|
</xsl:choose>
|
4392
4395
|
|
@@ -4397,13 +4400,26 @@
|
|
4397
4400
|
|
4398
4401
|
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
4399
4402
|
|
4400
|
-
|
4401
|
-
|
4402
|
-
|
4403
|
-
|
4404
|
-
|
4405
|
-
|
4406
|
-
|
4403
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171 -->
|
4404
|
+
|
4405
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
4406
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
4407
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
4408
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4409
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
4410
|
+
</xsl:call-template>
|
4411
|
+
</xsl:for-each>
|
4412
|
+
|
4413
|
+
<!-- https://github.com/metanorma/metanorma-plateau/issues/171
|
4414
|
+
<xsl:if test="$namespace = 'plateau'">
|
4415
|
+
<xsl:apply-templates select="*[not(local-name()='thead') and not(local-name()='tbody') and not(local-name()='tfoot') and not(local-name()='name')]" />
|
4416
|
+
<xsl:for-each select="*[local-name()='tbody']"> - select context to tbody -
|
4417
|
+
<xsl:variable name="table_fn_block">
|
4418
|
+
<xsl:call-template name="table_fn_display" />
|
4419
|
+
</xsl:variable>
|
4420
|
+
<xsl:copy-of select="$table_fn_block"/>
|
4421
|
+
</xsl:for-each>
|
4422
|
+
</xsl:if> -->
|
4407
4423
|
|
4408
4424
|
<xsl:if test="*[local-name()='bookmark']"> <!-- special case: table/bookmark -->
|
4409
4425
|
<fo:block keep-with-previous="always" line-height="0.1">
|
@@ -5096,6 +5112,7 @@
|
|
5096
5112
|
<xsl:with-param name="key">continued</xsl:with-param>
|
5097
5113
|
</xsl:call-template>
|
5098
5114
|
</xsl:variable>
|
5115
|
+
|
5099
5116
|
<xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
|
5100
5117
|
<xsl:variable name="title_continued">
|
5101
5118
|
<xsl:value-of select="$title_continued_in_parenthesis"/>
|
@@ -5334,6 +5351,17 @@
|
|
5334
5351
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
5335
5352
|
</xsl:if>
|
5336
5353
|
|
5354
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
5355
|
+
<xsl:if test="@colspan and *[local-name() = 'note'][@type = 'units']">
|
5356
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
5357
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
5358
|
+
<xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
|
5359
|
+
<xsl:attribute name="border-top">1pt solid white</xsl:attribute>
|
5360
|
+
<xsl:attribute name="border-left">1pt solid white</xsl:attribute>
|
5361
|
+
<xsl:attribute name="border-right">1pt solid white</xsl:attribute>
|
5362
|
+
</xsl:if>
|
5363
|
+
</xsl:if>
|
5364
|
+
|
5337
5365
|
<fo:block role="SKIP">
|
5338
5366
|
|
5339
5367
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -5352,7 +5380,8 @@
|
|
5352
5380
|
</fo:table-cell>
|
5353
5381
|
</xsl:template> <!-- td -->
|
5354
5382
|
|
5355
|
-
|
5383
|
+
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
5384
|
+
<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">
|
5356
5385
|
|
5357
5386
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
5358
5387
|
<xsl:copy-of select="@id"/>
|
@@ -5373,65 +5402,54 @@
|
|
5373
5402
|
|
5374
5403
|
</xsl:template> <!-- table/note -->
|
5375
5404
|
|
5376
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
5405
|
+
<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">
|
5377
5406
|
<xsl:apply-templates/>
|
5378
5407
|
</xsl:template>
|
5379
5408
|
|
5380
5409
|
<!-- ===================== -->
|
5381
5410
|
<!-- Footnotes processing -->
|
5382
5411
|
<!-- ===================== -->
|
5412
|
+
|
5413
|
+
<!-- document text (not figures, or tables) footnotes -->
|
5414
|
+
<xsl:variable name="footnotes_">
|
5415
|
+
<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 -->
|
5416
|
+
<!-- <xsl:copy-of select="."/> -->
|
5417
|
+
<xsl:variable name="update_xml_step1">
|
5418
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
5419
|
+
</xsl:variable>
|
5420
|
+
<xsl:apply-templates select="xalan:nodeset($update_xml_step1)" mode="update_xml_enclose_keep-together_within-line"/>
|
5421
|
+
</xsl:for-each>
|
5422
|
+
</xsl:variable>
|
5423
|
+
<xsl:variable name="footnotes" select="xalan:nodeset($footnotes_)"/>
|
5424
|
+
|
5383
5425
|
<!--
|
5384
5426
|
<fn reference="1">
|
5385
5427
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
5386
5428
|
</fn>
|
5387
5429
|
-->
|
5388
|
-
<!-- footnotes in text (title, bibliography, main body, table's, figure's names
|
5430
|
+
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
5431
|
+
<!-- fn in text -->
|
5389
5432
|
<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">
|
5390
5433
|
|
5391
|
-
<!-- list of
|
5434
|
+
<!-- list of unique footnotes -->
|
5392
5435
|
<xsl:variable name="p_fn_">
|
5393
5436
|
<xsl:call-template name="get_fn_list"/>
|
5394
|
-
<!-- <xsl:choose>
|
5395
|
-
<xsl:when test="$namespace = 'jis'">
|
5396
|
-
<xsl:call-template name="get_fn_list_for_element"/>
|
5397
|
-
</xsl:when>
|
5398
|
-
<xsl:otherwise>
|
5399
|
-
<xsl:call-template name="get_fn_list"/>
|
5400
|
-
</xsl:otherwise>
|
5401
|
-
</xsl:choose> -->
|
5402
5437
|
</xsl:variable>
|
5403
5438
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
5404
5439
|
|
5405
5440
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
5406
|
-
|
5407
|
-
<xsl:variable name="reference_">
|
5408
|
-
<xsl:value-of select="@reference"/>
|
5409
|
-
<xsl:if test="normalize-space(@reference) = ''"><xsl:value-of select="$gen_id"/></xsl:if>
|
5410
|
-
</xsl:variable>
|
5411
|
-
<xsl:variable name="reference" select="normalize-space($reference_)"/>
|
5441
|
+
|
5412
5442
|
<!-- fn sequence number in document -->
|
5413
|
-
<xsl:variable name="current_fn_number"
|
5414
|
-
|
5415
|
-
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
5416
|
-
<xsl:otherwise>
|
5417
|
-
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
5418
|
-
</xsl:otherwise>
|
5419
|
-
</xsl:choose>
|
5420
|
-
</xsl:variable>
|
5443
|
+
<xsl:variable name="current_fn_number" select="@reference"/>
|
5444
|
+
|
5421
5445
|
<xsl:variable name="current_fn_number_text">
|
5422
5446
|
|
5423
5447
|
<xsl:value-of select="$current_fn_number"/>
|
5424
5448
|
|
5425
5449
|
</xsl:variable>
|
5426
5450
|
|
5427
|
-
<xsl:variable name="ref_id"
|
5428
|
-
|
5429
|
-
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
5430
|
-
<xsl:otherwise>
|
5431
|
-
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
5432
|
-
</xsl:otherwise>
|
5433
|
-
</xsl:choose>
|
5434
|
-
</xsl:variable>
|
5451
|
+
<xsl:variable name="ref_id" select="@target"/>
|
5452
|
+
|
5435
5453
|
<xsl:variable name="footnote_inline">
|
5436
5454
|
<fo:inline role="Reference">
|
5437
5455
|
|
@@ -5476,7 +5494,9 @@
|
|
5476
5494
|
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
5477
5495
|
<xsl:copy-of select="$footnote_inline"/>
|
5478
5496
|
</xsl:when>
|
5497
|
+
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
5479
5498
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
5499
|
+
|
5480
5500
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5481
5501
|
<xsl:copy-of select="$footnote_inline"/>
|
5482
5502
|
<fo:footnote-body role="Note">
|
@@ -5493,7 +5513,10 @@
|
|
5493
5513
|
<xsl:value-of select="$current_fn_number_text"/>
|
5494
5514
|
|
5495
5515
|
</fo:inline>
|
5496
|
-
<xsl:apply-templates/>
|
5516
|
+
<!-- <xsl:apply-templates /> -->
|
5517
|
+
<!-- <ref_id><xsl:value-of select="$ref_id"/></ref_id>
|
5518
|
+
<here><xsl:copy-of select="$footnotes"/></here> -->
|
5519
|
+
<xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
|
5497
5520
|
</xsl:variable>
|
5498
5521
|
|
5499
5522
|
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
@@ -5547,77 +5570,136 @@
|
|
5547
5570
|
</xsl:choose>
|
5548
5571
|
</xsl:template>
|
5549
5572
|
|
5550
|
-
<xsl:template name="get_fn_list_for_element">
|
5551
|
-
<xsl:choose>
|
5552
|
-
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
5553
|
-
<fn gen_id="{generate-id(.)}">
|
5554
|
-
<xsl:copy-of select="@*"/>
|
5555
|
-
<xsl:copy-of select="node()"/>
|
5556
|
-
</fn>
|
5557
|
-
</xsl:when>
|
5558
|
-
<xsl:otherwise>
|
5559
|
-
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
5560
|
-
<xsl:variable name="element_id" select="@id"/>
|
5561
|
-
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
5562
|
-
<!-- copy unique fn -->
|
5563
|
-
<fn gen_id="{generate-id(.)}">
|
5564
|
-
<xsl:copy-of select="@*"/>
|
5565
|
-
<xsl:copy-of select="node()"/>
|
5566
|
-
</fn>
|
5567
|
-
</xsl:for-each>
|
5568
|
-
</xsl:for-each>
|
5569
|
-
</xsl:otherwise>
|
5570
|
-
</xsl:choose>
|
5571
|
-
</xsl:template>
|
5572
5573
|
<!-- ============================ -->
|
5573
5574
|
<!-- table's footnotes rendering -->
|
5574
5575
|
<!-- ============================ -->
|
5575
|
-
<xsl:template name="table_fn_display">
|
5576
|
-
<xsl:variable name="references">
|
5577
5576
|
|
5577
|
+
<!-- table/fmt-footnote-container -->
|
5578
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'fmt-footnote-container']"/>
|
5579
|
+
|
5580
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'fmt-footnote-container']">
|
5581
|
+
<xsl:for-each select=".">
|
5582
|
+
<xsl:call-template name="table_fn_display"/>
|
5583
|
+
</xsl:for-each>
|
5584
|
+
</xsl:template>
|
5585
|
+
|
5586
|
+
<xsl:template name="table_fn_display">
|
5587
|
+
<!-- <xsl:variable name="references">
|
5588
|
+
<xsl:if test="$namespace = 'bsi'">
|
5589
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) = 'name']">
|
5590
|
+
<xsl:call-template name="create_fn" />
|
5591
|
+
</xsl:for-each>
|
5592
|
+
</xsl:if>
|
5578
5593
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
5579
|
-
<xsl:call-template name="create_fn"/>
|
5594
|
+
<xsl:call-template name="create_fn" />
|
5580
5595
|
</xsl:for-each>
|
5581
|
-
</xsl:variable>
|
5582
|
-
|
5583
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
5596
|
+
</xsl:variable> -->
|
5597
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn">
|
5584
5598
|
<xsl:variable name="reference" select="@reference"/>
|
5585
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
5599
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
5600
|
+
<xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
5586
5601
|
|
5587
5602
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
5603
|
+
<xsl:copy-of select="@id"/>
|
5588
5604
|
<xsl:call-template name="refine_table-fn-style"/>
|
5589
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
5590
|
-
<xsl:call-template name="refine_table-fn-number-style"/>
|
5591
|
-
|
5592
|
-
<xsl:value-of select="@reference"/>
|
5593
5605
|
|
5594
|
-
|
5595
|
-
|
5596
|
-
|
5597
|
-
</xsl:if> -->
|
5606
|
+
<xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
|
5607
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5608
|
+
</xsl:apply-templates>
|
5598
5609
|
|
5599
|
-
</fo:inline>
|
5600
5610
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
5601
|
-
<xsl:copy-of select="./node()"/>
|
5611
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
5612
|
+
<xsl:apply-templates/>
|
5602
5613
|
</fo:inline>
|
5603
5614
|
|
5604
5615
|
</fo:block>
|
5605
5616
|
|
5606
|
-
</xsl:if>
|
5617
|
+
<!-- </xsl:if> -->
|
5607
5618
|
</xsl:for-each>
|
5608
5619
|
</xsl:template> <!-- table_fn_display -->
|
5609
5620
|
|
5621
|
+
<!-- fmt-fn-body/fmt-fn-label in text -->
|
5622
|
+
<xsl:template match="*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"/>
|
5623
|
+
|
5624
|
+
<!-- table//fmt-fn-body//fmt-fn-label -->
|
5625
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
5626
|
+
<xsl:param name="process">false</xsl:param>
|
5627
|
+
<xsl:if test="$process = 'true'">
|
5628
|
+
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
5629
|
+
|
5630
|
+
<!-- tab is padding-right -->
|
5631
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
5632
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5633
|
+
</xsl:apply-templates>
|
5634
|
+
|
5635
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5636
|
+
<fo:inline font-style="normal">(</fo:inline>
|
5637
|
+
</xsl:if> -->
|
5638
|
+
|
5639
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5640
|
+
<xsl:text>※</xsl:text>
|
5641
|
+
</xsl:if> -->
|
5642
|
+
|
5643
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5644
|
+
<!-- <xsl:value-of select="normalize-space()"/> -->
|
5645
|
+
<xsl:apply-templates/>
|
5646
|
+
|
5647
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
5648
|
+
<fo:inline font-style="normal">)</fo:inline>
|
5649
|
+
</xsl:if> -->
|
5650
|
+
|
5651
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
5652
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
5653
|
+
<xsl:text>)</xsl:text>
|
5654
|
+
</xsl:if> -->
|
5655
|
+
|
5656
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5657
|
+
<xsl:text>:</xsl:text>
|
5658
|
+
</xsl:if> -->
|
5659
|
+
|
5660
|
+
</fo:inline>
|
5661
|
+
</xsl:if>
|
5662
|
+
</xsl:template> <!-- fmt-fn-body//fmt-fn-label -->
|
5663
|
+
|
5664
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
5665
|
+
<xsl:param name="process">false</xsl:param>
|
5666
|
+
<xsl:if test="$process = 'true'">
|
5667
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
5668
|
+
|
5669
|
+
</xsl:if>
|
5670
|
+
</xsl:template>
|
5671
|
+
|
5672
|
+
<xsl:template match="*[local-name() = 'table']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
5673
|
+
<fo:inline xsl:use-attribute-sets="table-fmt-fn-label-style" role="SKIP">
|
5674
|
+
<xsl:call-template name="refine_table-fmt-fn-label-style"/>
|
5675
|
+
<xsl:apply-templates/>
|
5676
|
+
</fo:inline>
|
5677
|
+
</xsl:template>
|
5678
|
+
|
5679
|
+
<!-- <xsl:template match="*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']"/> -->
|
5680
|
+
<!--
|
5610
5681
|
<xsl:template name="create_fn">
|
5611
5682
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
5612
|
-
<xsl:if test="ancestor::*[local-name()='table'][1]/@id">
|
5683
|
+
<xsl:if test="ancestor::*[local-name()='table'][1]/@id"> - for footnotes in tables -
|
5613
5684
|
<xsl:attribute name="id">
|
5614
5685
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5615
5686
|
</xsl:attribute>
|
5616
5687
|
</xsl:if>
|
5617
|
-
|
5618
|
-
|
5688
|
+
<xsl:if test="$namespace = 'itu'">
|
5689
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
5690
|
+
<xsl:attribute name="preface">true</xsl:attribute>
|
5691
|
+
</xsl:if>
|
5692
|
+
</xsl:if>
|
5693
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5694
|
+
<xsl:attribute name="id">
|
5695
|
+
<xsl:value-of select="@reference"/>
|
5696
|
+
<xsl:text>_</xsl:text>
|
5697
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5698
|
+
</xsl:attribute>
|
5699
|
+
</xsl:if>
|
5700
|
+
<xsl:apply-templates />
|
5619
5701
|
</fn>
|
5620
|
-
</xsl:template>
|
5702
|
+
</xsl:template> -->
|
5621
5703
|
|
5622
5704
|
<!-- footnotes for table's name rendering -->
|
5623
5705
|
<xsl:template name="table_name_fn_display">
|
@@ -5636,123 +5718,171 @@
|
|
5636
5718
|
<!-- ============================ -->
|
5637
5719
|
<!-- figure's footnotes rendering -->
|
5638
5720
|
<!-- ============================ -->
|
5639
|
-
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
5640
5721
|
|
5641
|
-
|
5642
|
-
|
5643
|
-
|
5644
|
-
|
5645
|
-
|
5646
|
-
<xsl:variable name="figure_id" select="normalize-space($figure_id_)"/>
|
5722
|
+
<!-- figure/fmt-footnote-container -->
|
5723
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-footnote-container']"/>
|
5724
|
+
|
5725
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
5726
|
+
<xsl:template name="figure_fn_display">
|
5647
5727
|
|
5648
|
-
<!-- all footnotes relates to the current figure -->
|
5649
5728
|
<xsl:variable name="references">
|
5650
|
-
<xsl:for-each select="
|
5651
|
-
<
|
5652
|
-
|
5653
|
-
|
5729
|
+
<xsl:for-each select="./*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
|
5730
|
+
<xsl:variable name="curr_id" select="@id"/>
|
5731
|
+
<!-- <curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
5732
|
+
<curr><xsl:copy-of select="."/></curr>
|
5733
|
+
<ancestor><xsl:copy-of select="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn']]]"/></ancestor> -->
|
5734
|
+
<xsl:choose>
|
5735
|
+
<!-- skip figure/name/fn -->
|
5736
|
+
<xsl:when test="ancestor::*[local-name() = 'figure'][.//*[local-name() = 'name'][.//*[local-name() = 'fn'][@target = $curr_id]]]"><!-- skip --></xsl:when>
|
5737
|
+
<xsl:otherwise>
|
5738
|
+
<xsl:element name="figure" namespace="{$namespace_full}">
|
5739
|
+
<xsl:element name="fmt-footnote-container" namespace="{$namespace_full}">
|
5740
|
+
<xsl:copy-of select="."/>
|
5741
|
+
</xsl:element>
|
5742
|
+
</xsl:element>
|
5743
|
+
</xsl:otherwise>
|
5744
|
+
</xsl:choose>
|
5654
5745
|
</xsl:for-each>
|
5655
5746
|
</xsl:variable>
|
5747
|
+
<!-- <references><xsl:copy-of select="$references"/></references> -->
|
5656
5748
|
|
5657
|
-
<xsl:if test="xalan:nodeset($references)
|
5749
|
+
<xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
5658
5750
|
|
5659
5751
|
<xsl:variable name="key_iso">
|
5660
5752
|
true
|
5661
5753
|
</xsl:variable>
|
5662
5754
|
|
5663
5755
|
<fo:block>
|
5756
|
+
<!-- current hierarchy is 'figure' element -->
|
5757
|
+
<xsl:variable name="following_dl_colwidths">
|
5758
|
+
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
5759
|
+
<xsl:variable name="simple-table">
|
5760
|
+
<!-- <xsl:variable name="doc_ns">
|
5761
|
+
<xsl:if test="$namespace = 'bipm'">bipm</xsl:if>
|
5762
|
+
</xsl:variable>
|
5763
|
+
<xsl:variable name="ns">
|
5764
|
+
<xsl:choose>
|
5765
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
5766
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
5767
|
+
</xsl:when>
|
5768
|
+
<xsl:otherwise>
|
5769
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
5770
|
+
</xsl:otherwise>
|
5771
|
+
</xsl:choose>
|
5772
|
+
</xsl:variable> -->
|
5664
5773
|
|
5665
|
-
|
5666
|
-
|
5667
|
-
|
5668
|
-
|
5669
|
-
|
5670
|
-
|
5671
|
-
</xsl:variable>
|
5672
|
-
<xsl:variable name="ns">
|
5673
|
-
<xsl:choose>
|
5674
|
-
<xsl:when test="normalize-space($doc_ns) != ''">
|
5675
|
-
<xsl:value-of select="normalize-space($doc_ns)"/>
|
5676
|
-
</xsl:when>
|
5677
|
-
<xsl:otherwise>
|
5678
|
-
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
5679
|
-
</xsl:otherwise>
|
5680
|
-
</xsl:choose>
|
5681
|
-
</xsl:variable> -->
|
5774
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5775
|
+
<tbody>
|
5776
|
+
<xsl:apply-templates mode="dl"/>
|
5777
|
+
</tbody>
|
5778
|
+
</xsl:for-each>
|
5779
|
+
</xsl:variable>
|
5682
5780
|
|
5683
|
-
|
5684
|
-
|
5685
|
-
|
5686
|
-
|
5687
|
-
</xsl:for-each>
|
5688
|
-
</xsl:variable>
|
5781
|
+
<xsl:call-template name="calculate-column-widths">
|
5782
|
+
<xsl:with-param name="cols-count" select="2"/>
|
5783
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
5784
|
+
</xsl:call-template>
|
5689
5785
|
|
5690
|
-
|
5691
|
-
|
5692
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
5693
|
-
</xsl:call-template>
|
5786
|
+
</xsl:if>
|
5787
|
+
</xsl:variable>
|
5694
5788
|
|
5695
|
-
|
5696
|
-
|
5789
|
+
<xsl:variable name="maxlength_dt">
|
5790
|
+
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5791
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
5792
|
+
</xsl:for-each>
|
5793
|
+
</xsl:variable>
|
5697
5794
|
|
5698
|
-
|
5699
|
-
|
5700
|
-
|
5701
|
-
</xsl:for-each>
|
5702
|
-
</xsl:variable>
|
5795
|
+
<fo:table width="95%" table-layout="fixed">
|
5796
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5797
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5703
5798
|
|
5704
|
-
|
5705
|
-
|
5706
|
-
|
5799
|
+
</xsl:if>
|
5800
|
+
<xsl:choose>
|
5801
|
+
<!-- if there 'dl', then set same columns width -->
|
5802
|
+
<xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
|
5803
|
+
<xsl:call-template name="setColumnWidth_dl">
|
5804
|
+
<xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
|
5805
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
5806
|
+
</xsl:call-template>
|
5807
|
+
</xsl:when>
|
5808
|
+
<xsl:otherwise>
|
5809
|
+
<fo:table-column column-width="5%"/>
|
5810
|
+
<fo:table-column column-width="95%"/>
|
5811
|
+
</xsl:otherwise>
|
5812
|
+
</xsl:choose>
|
5813
|
+
<fo:table-body>
|
5814
|
+
<!-- <xsl:for-each select="xalan:nodeset($references)//fn"> -->
|
5815
|
+
<xsl:for-each select="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
|
5707
5816
|
|
5708
|
-
|
5709
|
-
<xsl:
|
5710
|
-
|
5711
|
-
|
5712
|
-
|
5713
|
-
|
5714
|
-
|
5715
|
-
|
5716
|
-
|
5717
|
-
|
5718
|
-
<fo:table-column column-width="5%"/>
|
5719
|
-
<fo:table-column column-width="95%"/>
|
5720
|
-
</xsl:otherwise>
|
5721
|
-
</xsl:choose>
|
5722
|
-
<fo:table-body>
|
5723
|
-
<xsl:for-each select="xalan:nodeset($references)//fn">
|
5724
|
-
<xsl:variable name="reference" select="@reference"/>
|
5725
|
-
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
5726
|
-
<fo:table-row>
|
5727
|
-
<fo:table-cell>
|
5728
|
-
<fo:block>
|
5729
|
-
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
|
5730
|
-
<xsl:value-of select="@reference"/>
|
5817
|
+
<xsl:variable name="reference" select="@reference"/>
|
5818
|
+
<!-- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
|
5819
|
+
<fo:table-row>
|
5820
|
+
<fo:table-cell>
|
5821
|
+
<fo:block>
|
5822
|
+
|
5823
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
|
5824
|
+
<!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
|
5825
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5826
|
+
<xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
|
5731
5827
|
</fo:inline>
|
5732
|
-
</fo:block>
|
5733
|
-
</fo:table-cell>
|
5734
|
-
<fo:table-cell>
|
5735
|
-
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
5736
|
-
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5737
5828
|
|
5738
|
-
|
5829
|
+
</fo:block>
|
5830
|
+
</fo:table-cell>
|
5831
|
+
<fo:table-cell>
|
5832
|
+
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
5833
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
5739
5834
|
|
5740
|
-
|
5741
|
-
<xsl:copy-of select="./node()"/>
|
5742
|
-
</fo:block>
|
5743
|
-
</fo:table-cell>
|
5744
|
-
</fo:table-row>
|
5745
|
-
</xsl:if>
|
5746
|
-
</xsl:for-each>
|
5747
|
-
</fo:table-body>
|
5748
|
-
</fo:table>
|
5835
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
5749
5836
|
|
5837
|
+
</xsl:if>
|
5838
|
+
|
5839
|
+
<!-- <xsl:copy-of select="./node()"/> -->
|
5840
|
+
<xsl:apply-templates/>
|
5841
|
+
</fo:block>
|
5842
|
+
</fo:table-cell>
|
5843
|
+
</fo:table-row>
|
5844
|
+
<!-- </xsl:if> -->
|
5845
|
+
</xsl:for-each>
|
5846
|
+
</fo:table-body>
|
5847
|
+
</fo:table>
|
5750
5848
|
</fo:block>
|
5751
5849
|
</xsl:if>
|
5752
|
-
</xsl:template> <!--
|
5850
|
+
</xsl:template> <!-- figure_fn_display -->
|
5851
|
+
|
5852
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']"> <!-- *[local-name() = 'fmt-footnote-container']/ -->
|
5853
|
+
<xsl:param name="process">false</xsl:param>
|
5854
|
+
<xsl:if test="$process = 'true'">
|
5855
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
5856
|
+
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
5857
|
+
|
5858
|
+
<!-- tab is padding-right -->
|
5859
|
+
<xsl:apply-templates select=".//*[local-name() = 'tab']">
|
5860
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5861
|
+
</xsl:apply-templates>
|
5862
|
+
|
5863
|
+
<xsl:apply-templates/>
|
5864
|
+
|
5865
|
+
</fo:inline>
|
5866
|
+
</xsl:if>
|
5867
|
+
</xsl:template> <!-- figure//fmt-fn-body//fmt-fn-label -->
|
5868
|
+
|
5869
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'tab']" priority="5">
|
5870
|
+
<xsl:param name="process">false</xsl:param>
|
5871
|
+
<xsl:if test="$process = 'true'">
|
5872
|
+
|
5873
|
+
</xsl:if>
|
5874
|
+
</xsl:template>
|
5875
|
+
|
5876
|
+
<xsl:template match="*[local-name() = 'figure']//*[local-name() = 'fmt-fn-body']//*[local-name() = 'fmt-fn-label']//*[local-name() = 'sup']" priority="5">
|
5877
|
+
<fo:inline xsl:use-attribute-sets="figure-fmt-fn-label-style" role="SKIP">
|
5878
|
+
<xsl:call-template name="refine_figure-fmt-fn-label-style"/>
|
5879
|
+
<xsl:apply-templates/>
|
5880
|
+
</fo:inline>
|
5881
|
+
</xsl:template>
|
5753
5882
|
|
5754
5883
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
5755
5884
|
<!-- figure's footnote label -->
|
5885
|
+
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
5756
5886
|
<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">
|
5757
5887
|
<xsl:variable name="key_iso">
|
5758
5888
|
true
|
@@ -5761,7 +5891,7 @@
|
|
5761
5891
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
5762
5892
|
|
5763
5893
|
</xsl:if>
|
5764
|
-
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
5894
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
5765
5895
|
<!-- <xsl:value-of select="@reference"/> -->
|
5766
5896
|
<xsl:apply-templates/>
|
5767
5897
|
</fo:inline>
|
@@ -5771,38 +5901,65 @@
|
|
5771
5901
|
<!-- END: figure's footnotes rendering -->
|
5772
5902
|
<!-- ============================ -->
|
5773
5903
|
|
5774
|
-
<!-- fn reference in the
|
5904
|
+
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
5905
|
+
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
5775
5906
|
<xsl:template match="*[local-name()='fn']">
|
5776
5907
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
5777
5908
|
|
5778
5909
|
<xsl:call-template name="refine_fn-reference-style"/>
|
5779
5910
|
|
5780
|
-
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5781
|
-
|
5782
|
-
|
5911
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5912
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
5913
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
5914
|
+
<!-- <xsl:attribute name="internal-destination">
|
5783
5915
|
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5784
5916
|
</xsl:attribute>
|
5785
5917
|
</xsl:if>
|
5918
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5919
|
+
<xsl:attribute name="internal-destination">
|
5920
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
5921
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5922
|
+
</xsl:attribute>
|
5923
|
+
</xsl:if> -->
|
5924
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5925
|
+
<xsl:text>※</xsl:text>
|
5926
|
+
</xsl:if> -->
|
5927
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5786
5928
|
|
5787
|
-
|
5929
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
5788
5930
|
|
5931
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
5932
|
+
<xsl:text>)</xsl:text>
|
5933
|
+
</xsl:if> -->
|
5789
5934
|
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
5790
5935
|
<!-- <xsl:if test="$namespace = 'jis'">
|
5791
5936
|
<fo:inline font-weight="normal">)</fo:inline>
|
5792
5937
|
</xsl:if> -->
|
5793
5938
|
</fo:basic-link>
|
5794
5939
|
</fo:inline>
|
5795
|
-
</xsl:template>
|
5940
|
+
</xsl:template> <!-- fn -->
|
5796
5941
|
|
5942
|
+
<!-- fn/text() -->
|
5797
5943
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
5798
5944
|
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
5799
5945
|
</xsl:template>
|
5800
5946
|
|
5801
|
-
|
5947
|
+
<!-- fn//p fmt-fn-body//p -->
|
5948
|
+
<xsl:template match="*[local-name()='fn']//*[local-name()='p'] | *[local-name() = 'fmt-fn-body']//*[local-name()='p']">
|
5802
5949
|
<fo:inline role="P">
|
5803
5950
|
<xsl:apply-templates/>
|
5804
5951
|
</fo:inline>
|
5805
5952
|
</xsl:template>
|
5953
|
+
|
5954
|
+
<xsl:template name="insertFootnoteSeparatorCommon">
|
5955
|
+
<xsl:param name="leader_length">30%</xsl:param>
|
5956
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
5957
|
+
<fo:block>
|
5958
|
+
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
5959
|
+
</fo:block>
|
5960
|
+
</fo:static-content>
|
5961
|
+
</xsl:template>
|
5962
|
+
|
5806
5963
|
<!-- ===================== -->
|
5807
5964
|
<!-- END Footnotes processing -->
|
5808
5965
|
<!-- ===================== -->
|
@@ -6083,11 +6240,11 @@
|
|
6083
6240
|
<xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
|
6084
6241
|
<!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
|
6085
6242
|
|
6086
|
-
|
6087
|
-
|
6088
|
-
|
6089
|
-
|
6090
|
-
|
6243
|
+
<xsl:call-template name="setColumnWidth_dl">
|
6244
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
6245
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
6246
|
+
<xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
|
6247
|
+
</xsl:call-template>
|
6091
6248
|
|
6092
6249
|
<fo:table-body>
|
6093
6250
|
|
@@ -6121,6 +6278,14 @@
|
|
6121
6278
|
|
6122
6279
|
</xsl:template> <!-- END: dl -->
|
6123
6280
|
|
6281
|
+
<xsl:template match="@*|node()" mode="dt_clean">
|
6282
|
+
<xsl:copy>
|
6283
|
+
<xsl:apply-templates select="@*|node()" mode="dt_clean"/>
|
6284
|
+
</xsl:copy>
|
6285
|
+
</xsl:template>
|
6286
|
+
|
6287
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="dt_clean"/>
|
6288
|
+
|
6124
6289
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
6125
6290
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
6126
6291
|
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
@@ -6160,10 +6325,12 @@
|
|
6160
6325
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
6161
6326
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
6162
6327
|
|
6328
|
+
<!-- dl/name -->
|
6163
6329
|
<xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
|
6164
6330
|
<xsl:param name="process">false</xsl:param>
|
6165
6331
|
<xsl:if test="$process = 'true'">
|
6166
6332
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
6333
|
+
|
6167
6334
|
<xsl:apply-templates/>
|
6168
6335
|
</fo:block>
|
6169
6336
|
</xsl:if>
|
@@ -6177,6 +6344,10 @@
|
|
6177
6344
|
<!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
|
6178
6345
|
|
6179
6346
|
<xsl:choose>
|
6347
|
+
<!-- <xsl:when test="@class = 'formula_dl' and local-name(..) = 'figure'">
|
6348
|
+
<fo:table-column column-width="10%"/>
|
6349
|
+
<fo:table-column column-width="90%"/>
|
6350
|
+
</xsl:when> -->
|
6180
6351
|
<xsl:when test="xalan:nodeset($colwidths)/autolayout">
|
6181
6352
|
<xsl:call-template name="insertTableColumnWidth">
|
6182
6353
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
@@ -8308,6 +8479,27 @@
|
|
8308
8479
|
<xsl:variable name="target__" select="substring-after($target_, concat('_', $inputxml_filename_prefix, '_attachments', '/'))"/>
|
8309
8480
|
<xsl:value-of select="concat('url(embedded-file:', $target__, ')')"/>
|
8310
8481
|
</xsl:when> -->
|
8482
|
+
|
8483
|
+
<!-- <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'))">
|
8484
|
+
<xsl:variable name="target_" select="translate(@target, '\', '/')"/>
|
8485
|
+
<xsl:variable name="filename">
|
8486
|
+
<xsl:call-template name="substring-after-last">
|
8487
|
+
<xsl:with-param name="value" select="$target_"/>
|
8488
|
+
<xsl:with-param name="delimiter" select="'/'"/>
|
8489
|
+
</xsl:call-template>
|
8490
|
+
</xsl:variable>
|
8491
|
+
<xsl:variable name="target_filepath" select="concat($inputxml_basepath, @target)"/>
|
8492
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($target_filepath)))"/>
|
8493
|
+
<xsl:choose>
|
8494
|
+
<xsl:when test="$file_exists = 'true'">
|
8495
|
+
<xsl:value-of select="concat('url(embedded-file:', $filename, ')')"/>
|
8496
|
+
</xsl:when>
|
8497
|
+
<xsl:otherwise>
|
8498
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
8499
|
+
</xsl:otherwise>
|
8500
|
+
</xsl:choose>
|
8501
|
+
</xsl:when> -->
|
8502
|
+
|
8311
8503
|
<xsl:otherwise>
|
8312
8504
|
<xsl:value-of select="normalize-space(@target)"/>
|
8313
8505
|
</xsl:otherwise>
|
@@ -8612,7 +8804,7 @@
|
|
8612
8804
|
|
8613
8805
|
<xsl:template name="refine_note_block_style">
|
8614
8806
|
|
8615
|
-
</xsl:template>
|
8807
|
+
</xsl:template> <!-- refine_note_block_style -->
|
8616
8808
|
|
8617
8809
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
8618
8810
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
@@ -8804,10 +8996,21 @@
|
|
8804
8996
|
</xsl:template>
|
8805
8997
|
|
8806
8998
|
<xsl:template name="showFigureKey">
|
8807
|
-
<xsl:for-each select="*[local-name() = 'note'
|
8808
|
-
<xsl:
|
8999
|
+
<xsl:for-each select="*[(local-name() = 'note' and not(@type = 'units')) or local-name() = 'example']">
|
9000
|
+
<xsl:choose>
|
9001
|
+
<xsl:when test="local-name() = 'note'">
|
9002
|
+
<xsl:call-template name="note"/>
|
9003
|
+
</xsl:when>
|
9004
|
+
<xsl:when test="local-name() = 'example'">
|
9005
|
+
<xsl:call-template name="example"/>
|
9006
|
+
</xsl:when>
|
9007
|
+
<xsl:otherwise>
|
9008
|
+
<xsl:apply-templates select="."/>
|
9009
|
+
</xsl:otherwise>
|
9010
|
+
</xsl:choose>
|
8809
9011
|
</xsl:for-each>
|
8810
|
-
|
9012
|
+
<!-- TO DO: remove, now the figure fn in figure/dl/... https://github.com/metanorma/isodoc/issues/658 -->
|
9013
|
+
<xsl:call-template name="figure_fn_display"/>
|
8811
9014
|
</xsl:template>
|
8812
9015
|
|
8813
9016
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
@@ -9701,10 +9904,10 @@
|
|
9701
9904
|
<xsl:when test="@type = 'section-title'">
|
9702
9905
|
<xsl:value-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/preceding-sibling::node()"/>
|
9703
9906
|
<xsl:text>: </xsl:text>
|
9704
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
9907
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
9705
9908
|
</xsl:when>
|
9706
9909
|
<xsl:otherwise>
|
9707
|
-
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name = 'fmt-xref-label')]"/>
|
9910
|
+
<xsl:copy-of select="*[local-name() = 'span'][@class = 'fmt-caption-delim'][1]/following-sibling::node()[not(local-name() = 'fmt-xref-label')]"/>
|
9708
9911
|
</xsl:otherwise>
|
9709
9912
|
</xsl:choose>
|
9710
9913
|
</xsl:when>
|
@@ -10035,9 +10238,15 @@
|
|
10035
10238
|
</xsl:if>
|
10036
10239
|
</xsl:template>
|
10037
10240
|
|
10241
|
+
<!-- figure/fn -->
|
10038
10242
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
10039
|
-
|
10243
|
+
<!-- figure/note -->
|
10244
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
10245
|
+
<!-- figure/example -->
|
10246
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
10040
10247
|
|
10248
|
+
<!-- figure/note[@type = 'units'] -->
|
10249
|
+
<!-- image/note[@type = 'units'] -->
|
10041
10250
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
10042
10251
|
<fo:block text-align="right" keep-with-next="always">
|
10043
10252
|
<xsl:apply-templates/>
|
@@ -10158,6 +10367,7 @@
|
|
10158
10367
|
</xsl:choose>
|
10159
10368
|
</xsl:template>
|
10160
10369
|
|
10370
|
+
<!-- fn -->
|
10161
10371
|
<xsl:template match="*[local-name() = 'fn']" mode="contents"/>
|
10162
10372
|
<xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/>
|
10163
10373
|
|
@@ -11054,7 +11264,7 @@
|
|
11054
11264
|
text line 1
|
11055
11265
|
text line 2
|
11056
11266
|
-->
|
11057
|
-
<xsl:template match="*[local-name() = 'example']">
|
11267
|
+
<xsl:template match="*[local-name() = 'example']" name="example">
|
11058
11268
|
|
11059
11269
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
11060
11270
|
|
@@ -11160,6 +11370,7 @@
|
|
11160
11370
|
|
11161
11371
|
</xsl:template>
|
11162
11372
|
|
11373
|
+
<!-- example/name -->
|
11163
11374
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
11164
11375
|
<xsl:param name="fo_element">block</xsl:param>
|
11165
11376
|
|
@@ -11185,7 +11396,8 @@
|
|
11185
11396
|
|
11186
11397
|
</xsl:template>
|
11187
11398
|
|
11188
|
-
|
11399
|
+
<!-- table/example/name, table/tfoot//example/name -->
|
11400
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
|
11189
11401
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
11190
11402
|
|
11191
11403
|
<xsl:apply-templates/>
|
@@ -12833,8 +13045,33 @@
|
|
12833
13045
|
|
12834
13046
|
<xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
12835
13047
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13048
|
+
<!-- New format: one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13049
|
+
<!-- <test><xsl:copy-of select="."/></test> -->
|
13050
|
+
|
12836
13051
|
<xsl:variable name="target" select="@target"/>
|
13052
|
+
|
12837
13053
|
<xsl:for-each select="*[local-name() = 'tab']">
|
13054
|
+
|
13055
|
+
<xsl:if test="position() = 1">
|
13056
|
+
<!-- first column (data before first `tab`) -->
|
13057
|
+
<fo:table-cell>
|
13058
|
+
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
13059
|
+
<xsl:call-template name="insert_basic_link">
|
13060
|
+
<xsl:with-param name="element">
|
13061
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
13062
|
+
<xsl:for-each select="preceding-sibling::node()">
|
13063
|
+
<xsl:choose>
|
13064
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13065
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
13066
|
+
</xsl:choose>
|
13067
|
+
</xsl:for-each>
|
13068
|
+
</fo:basic-link>
|
13069
|
+
</xsl:with-param>
|
13070
|
+
</xsl:call-template>
|
13071
|
+
</fo:block>
|
13072
|
+
</fo:table-cell>
|
13073
|
+
</xsl:if>
|
13074
|
+
|
12838
13075
|
<xsl:variable name="current_id" select="generate-id()"/>
|
12839
13076
|
<fo:table-cell>
|
12840
13077
|
<fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
|
@@ -12885,11 +13122,25 @@
|
|
12885
13122
|
|
12886
13123
|
<xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
12887
13124
|
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
13125
|
+
<!-- New format - one tab <xref target="cgpm9th1948r6">“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
12888
13126
|
<xsl:for-each select="*[local-name() = 'tab']">
|
13127
|
+
<xsl:if test="position() = 1">
|
13128
|
+
<td>
|
13129
|
+
<xsl:for-each select="preceding-sibling::node()">
|
13130
|
+
<xsl:choose>
|
13131
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13132
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
13133
|
+
</xsl:choose>
|
13134
|
+
</xsl:for-each>
|
13135
|
+
</td>
|
13136
|
+
</xsl:if>
|
12889
13137
|
<xsl:variable name="current_id" select="generate-id()"/>
|
12890
13138
|
<td>
|
12891
13139
|
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
12892
|
-
<xsl:
|
13140
|
+
<xsl:choose>
|
13141
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
13142
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
13143
|
+
</xsl:choose>
|
12893
13144
|
</xsl:for-each>
|
12894
13145
|
</td>
|
12895
13146
|
</xsl:for-each>
|
@@ -14287,6 +14538,7 @@
|
|
14287
14538
|
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
14288
14539
|
</fn>
|
14289
14540
|
-->
|
14541
|
+
<!-- fn in text -->
|
14290
14542
|
<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">
|
14291
14543
|
<xsl:variable name="p_fn_">
|
14292
14544
|
<xsl:call-template name="get_fn_list"/>
|