metanorma-bipm 2.5.9 → 2.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +177 -13
- data/lib/isodoc/bipm/bipm.guide.xsl +177 -13
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +177 -13
- data/lib/isodoc/bipm/bipm.rapport.xsl +177 -13
- data/lib/isodoc/bipm/jcgm.standard.xsl +244 -18
- data/lib/isodoc/bipm/presentation_xml_convert.rb +7 -2
- data/lib/metanorma/bipm/biblio.rng +15 -9
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +5 -5
@@ -1376,6 +1376,7 @@
|
|
1376
1376
|
<fo:block> </fo:block>
|
1377
1377
|
<fo:block> </fo:block>
|
1378
1378
|
<fo:block> </fo:block>
|
1379
|
+
<fo:block text-align="right"><xsl:value-of select="bipm:bibdata/bipm:version/bipm:draft"/></fo:block>
|
1379
1380
|
<fo:block text-align-last="justify">
|
1380
1381
|
<fo:inline>
|
1381
1382
|
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix">
|
@@ -3982,8 +3983,21 @@
|
|
3982
3983
|
|
3983
3984
|
<!-- <xsl:strip-space elements="bipm:xref"/> -->
|
3984
3985
|
|
3985
|
-
<xsl:variable name="
|
3986
|
-
|
3986
|
+
<xsl:variable name="namespace_full_">
|
3987
|
+
<xsl:choose>
|
3988
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
3989
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
3990
|
+
</xsl:choose>
|
3991
|
+
</xsl:variable>
|
3992
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
3993
|
+
|
3994
|
+
<xsl:variable name="root_element_">
|
3995
|
+
<xsl:choose>
|
3996
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
3997
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
3998
|
+
</xsl:choose>
|
3999
|
+
</xsl:variable>
|
4000
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
3987
4001
|
|
3988
4002
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
3989
4003
|
|
@@ -5172,6 +5186,9 @@
|
|
5172
5186
|
|
5173
5187
|
</xsl:attribute-set>
|
5174
5188
|
|
5189
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
5190
|
+
</xsl:attribute-set>
|
5191
|
+
|
5175
5192
|
<xsl:attribute-set name="definition-style">
|
5176
5193
|
|
5177
5194
|
</xsl:attribute-set>
|
@@ -7470,7 +7487,9 @@
|
|
7470
7487
|
<xsl:with-param name="element">
|
7471
7488
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
7472
7489
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
7490
|
+
|
7473
7491
|
<xsl:copy-of select="$current_fn_number_text"/>
|
7492
|
+
|
7474
7493
|
</fo:inline>
|
7475
7494
|
</fo:basic-link>
|
7476
7495
|
</xsl:with-param>
|
@@ -7489,8 +7508,7 @@
|
|
7489
7508
|
|
7490
7509
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
7491
7510
|
|
7492
|
-
<
|
7493
|
-
|
7511
|
+
<xsl:variable name="fn_block">
|
7494
7512
|
<xsl:call-template name="refine_fn-body-style"/>
|
7495
7513
|
|
7496
7514
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -7498,9 +7516,15 @@
|
|
7498
7516
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
7499
7517
|
|
7500
7518
|
<xsl:value-of select="$current_fn_number_text"/>
|
7519
|
+
|
7501
7520
|
</fo:inline>
|
7502
7521
|
<xsl:apply-templates/>
|
7503
|
-
</
|
7522
|
+
</xsl:variable>
|
7523
|
+
|
7524
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
7525
|
+
<xsl:copy-of select="$fn_block"/>
|
7526
|
+
</fo:block>
|
7527
|
+
|
7504
7528
|
</fo:block-container>
|
7505
7529
|
</fo:footnote-body>
|
7506
7530
|
</fo:footnote>
|
@@ -8895,6 +8919,12 @@
|
|
8895
8919
|
</xsl:if>
|
8896
8920
|
</xsl:template>
|
8897
8921
|
|
8922
|
+
<xsl:template match="*[local-name()='strike']">
|
8923
|
+
<fo:inline text-decoration="line-through">
|
8924
|
+
<xsl:apply-templates/>
|
8925
|
+
</fo:inline>
|
8926
|
+
</xsl:template>
|
8927
|
+
|
8898
8928
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
8899
8929
|
<fo:block break-after="page"/>
|
8900
8930
|
<fo:block> </fo:block>
|
@@ -13605,14 +13635,17 @@
|
|
13605
13635
|
</fo:block>
|
13606
13636
|
</xsl:template>
|
13607
13637
|
|
13608
|
-
<xsl:template match="*[local-name() = 'domain']">
|
13638
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
13609
13639
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
13610
13640
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
13611
13641
|
<xsl:text> </xsl:text> -->
|
13612
|
-
<xsl:if test="not(@hidden = 'true')">
|
13642
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
13613
13643
|
<xsl:apply-templates/>
|
13614
13644
|
</xsl:if>
|
13615
|
-
</xsl:template>
|
13645
|
+
</xsl:template> -->
|
13646
|
+
|
13647
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
13648
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
13616
13649
|
|
13617
13650
|
<xsl:template match="*[local-name() = 'admitted']">
|
13618
13651
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -13627,9 +13660,11 @@
|
|
13627
13660
|
</xsl:template>
|
13628
13661
|
|
13629
13662
|
<xsl:template name="setStyle_preferred">
|
13630
|
-
|
13631
|
-
|
13632
|
-
|
13663
|
+
|
13664
|
+
<xsl:if test="*[local-name() = 'strong']">
|
13665
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
13666
|
+
</xsl:if>
|
13667
|
+
|
13633
13668
|
</xsl:template>
|
13634
13669
|
|
13635
13670
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -13639,6 +13674,17 @@
|
|
13639
13674
|
</xsl:template>
|
13640
13675
|
<!-- End Preferred, admitted, deprecated -->
|
13641
13676
|
|
13677
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
13678
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
13679
|
+
<xsl:apply-templates/>
|
13680
|
+
</fo:block>
|
13681
|
+
</xsl:template>
|
13682
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
13683
|
+
<fo:block>
|
13684
|
+
<xsl:apply-templates/>
|
13685
|
+
</fo:block>
|
13686
|
+
</xsl:template>
|
13687
|
+
|
13642
13688
|
<!-- ========== -->
|
13643
13689
|
<!-- definition -->
|
13644
13690
|
<!-- ========== -->
|
@@ -14544,6 +14590,7 @@
|
|
14544
14590
|
|
14545
14591
|
<!-- Normative references -->
|
14546
14592
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
14593
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
14547
14594
|
|
14548
14595
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
14549
14596
|
|
@@ -15259,7 +15306,8 @@
|
|
15259
15306
|
<!-- add @id - first element with @id plus '_element_name' -->
|
15260
15307
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
15261
15308
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
15262
|
-
<xsl:
|
15309
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
15310
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
15263
15311
|
</xsl:if>
|
15264
15312
|
</xsl:template>
|
15265
15313
|
|
@@ -15316,6 +15364,31 @@
|
|
15316
15364
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
15317
15365
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
15318
15366
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
15367
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
15368
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
15369
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
15370
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
15371
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
15372
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
15373
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
15374
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
15375
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
15376
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
15377
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
15378
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
15379
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
15380
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
15381
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
15382
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
15383
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
15384
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
15385
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
15386
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
15387
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
15388
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
15389
|
+
|
15390
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
15391
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
15319
15392
|
|
15320
15393
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
15321
15394
|
<xsl:copy>
|
@@ -15360,6 +15433,94 @@
|
|
15360
15433
|
</xsl:element>
|
15361
15434
|
</xsl:template>
|
15362
15435
|
|
15436
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
15437
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15438
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15439
|
+
</xsl:template>
|
15440
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
15441
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
15442
|
+
<xsl:copy-of select="@*"/>
|
15443
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15444
|
+
</xsl:element>
|
15445
|
+
</xsl:template>
|
15446
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15447
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15448
|
+
</xsl:template>
|
15449
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
15450
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
15451
|
+
<xsl:copy-of select="@*"/>
|
15452
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15453
|
+
</xsl:element>
|
15454
|
+
</xsl:template>
|
15455
|
+
|
15456
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
15457
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15458
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15459
|
+
</xsl:template>
|
15460
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
15461
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
15462
|
+
<xsl:copy-of select="@*"/>
|
15463
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15464
|
+
</xsl:element>
|
15465
|
+
</xsl:template>
|
15466
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15467
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15468
|
+
</xsl:template>
|
15469
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
15470
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
15471
|
+
<xsl:copy-of select="@*"/>
|
15472
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15473
|
+
</xsl:element>
|
15474
|
+
</xsl:template>
|
15475
|
+
|
15476
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
15477
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15478
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15479
|
+
</xsl:template>
|
15480
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
15481
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
15482
|
+
<xsl:copy-of select="@*"/>
|
15483
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15484
|
+
</xsl:element>
|
15485
|
+
</xsl:template>
|
15486
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15487
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15488
|
+
</xsl:template>
|
15489
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
15490
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
15491
|
+
<xsl:copy-of select="@*"/>
|
15492
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15493
|
+
</xsl:element>
|
15494
|
+
</xsl:template>
|
15495
|
+
|
15496
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
15497
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
15498
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
15499
|
+
<xsl:copy-of select="@*"/>
|
15500
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15501
|
+
</xsl:element>
|
15502
|
+
</xsl:template>
|
15503
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
15504
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
15505
|
+
<xsl:copy-of select="@*"/>
|
15506
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15507
|
+
</xsl:element>
|
15508
|
+
</xsl:template>
|
15509
|
+
|
15510
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
15511
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
15512
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
15513
|
+
<xsl:copy-of select="@*"/>
|
15514
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15515
|
+
</xsl:element>
|
15516
|
+
</xsl:template>
|
15517
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
15518
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
15519
|
+
<xsl:copy-of select="@*"/>
|
15520
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15521
|
+
</xsl:element>
|
15522
|
+
</xsl:template>
|
15523
|
+
|
15363
15524
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
15364
15525
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15365
15526
|
</xsl:template>
|
@@ -16498,7 +16659,7 @@
|
|
16498
16659
|
</xsl:template>
|
16499
16660
|
|
16500
16661
|
<xsl:template name="namespaceCheck">
|
16501
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
16662
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
16502
16663
|
<xsl:variable name="XSLNS">
|
16503
16664
|
|
16504
16665
|
<xsl:value-of select="document('')//*/namespace::bipm"/>
|
@@ -16588,6 +16749,9 @@
|
|
16588
16749
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
16589
16750
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16590
16751
|
</xsl:when>
|
16752
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
16753
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16754
|
+
</xsl:when>
|
16591
16755
|
<xsl:when test="$formatted = 'true'">
|
16592
16756
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16593
16757
|
</xsl:when>
|
@@ -1376,6 +1376,7 @@
|
|
1376
1376
|
<fo:block> </fo:block>
|
1377
1377
|
<fo:block> </fo:block>
|
1378
1378
|
<fo:block> </fo:block>
|
1379
|
+
<fo:block text-align="right"><xsl:value-of select="bipm:bibdata/bipm:version/bipm:draft"/></fo:block>
|
1379
1380
|
<fo:block text-align-last="justify">
|
1380
1381
|
<fo:inline>
|
1381
1382
|
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix">
|
@@ -3982,8 +3983,21 @@
|
|
3982
3983
|
|
3983
3984
|
<!-- <xsl:strip-space elements="bipm:xref"/> -->
|
3984
3985
|
|
3985
|
-
<xsl:variable name="
|
3986
|
-
|
3986
|
+
<xsl:variable name="namespace_full_">
|
3987
|
+
<xsl:choose>
|
3988
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
3989
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
3990
|
+
</xsl:choose>
|
3991
|
+
</xsl:variable>
|
3992
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
3993
|
+
|
3994
|
+
<xsl:variable name="root_element_">
|
3995
|
+
<xsl:choose>
|
3996
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
3997
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
3998
|
+
</xsl:choose>
|
3999
|
+
</xsl:variable>
|
4000
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
3987
4001
|
|
3988
4002
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
3989
4003
|
|
@@ -5172,6 +5186,9 @@
|
|
5172
5186
|
|
5173
5187
|
</xsl:attribute-set>
|
5174
5188
|
|
5189
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
5190
|
+
</xsl:attribute-set>
|
5191
|
+
|
5175
5192
|
<xsl:attribute-set name="definition-style">
|
5176
5193
|
|
5177
5194
|
</xsl:attribute-set>
|
@@ -7470,7 +7487,9 @@
|
|
7470
7487
|
<xsl:with-param name="element">
|
7471
7488
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
7472
7489
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
7490
|
+
|
7473
7491
|
<xsl:copy-of select="$current_fn_number_text"/>
|
7492
|
+
|
7474
7493
|
</fo:inline>
|
7475
7494
|
</fo:basic-link>
|
7476
7495
|
</xsl:with-param>
|
@@ -7489,8 +7508,7 @@
|
|
7489
7508
|
|
7490
7509
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
7491
7510
|
|
7492
|
-
<
|
7493
|
-
|
7511
|
+
<xsl:variable name="fn_block">
|
7494
7512
|
<xsl:call-template name="refine_fn-body-style"/>
|
7495
7513
|
|
7496
7514
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -7498,9 +7516,15 @@
|
|
7498
7516
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
7499
7517
|
|
7500
7518
|
<xsl:value-of select="$current_fn_number_text"/>
|
7519
|
+
|
7501
7520
|
</fo:inline>
|
7502
7521
|
<xsl:apply-templates/>
|
7503
|
-
</
|
7522
|
+
</xsl:variable>
|
7523
|
+
|
7524
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
7525
|
+
<xsl:copy-of select="$fn_block"/>
|
7526
|
+
</fo:block>
|
7527
|
+
|
7504
7528
|
</fo:block-container>
|
7505
7529
|
</fo:footnote-body>
|
7506
7530
|
</fo:footnote>
|
@@ -8895,6 +8919,12 @@
|
|
8895
8919
|
</xsl:if>
|
8896
8920
|
</xsl:template>
|
8897
8921
|
|
8922
|
+
<xsl:template match="*[local-name()='strike']">
|
8923
|
+
<fo:inline text-decoration="line-through">
|
8924
|
+
<xsl:apply-templates/>
|
8925
|
+
</fo:inline>
|
8926
|
+
</xsl:template>
|
8927
|
+
|
8898
8928
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
8899
8929
|
<fo:block break-after="page"/>
|
8900
8930
|
<fo:block> </fo:block>
|
@@ -13605,14 +13635,17 @@
|
|
13605
13635
|
</fo:block>
|
13606
13636
|
</xsl:template>
|
13607
13637
|
|
13608
|
-
<xsl:template match="*[local-name() = 'domain']">
|
13638
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
13609
13639
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
13610
13640
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
13611
13641
|
<xsl:text> </xsl:text> -->
|
13612
|
-
<xsl:if test="not(@hidden = 'true')">
|
13642
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
13613
13643
|
<xsl:apply-templates/>
|
13614
13644
|
</xsl:if>
|
13615
|
-
</xsl:template>
|
13645
|
+
</xsl:template> -->
|
13646
|
+
|
13647
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
13648
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
13616
13649
|
|
13617
13650
|
<xsl:template match="*[local-name() = 'admitted']">
|
13618
13651
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -13627,9 +13660,11 @@
|
|
13627
13660
|
</xsl:template>
|
13628
13661
|
|
13629
13662
|
<xsl:template name="setStyle_preferred">
|
13630
|
-
|
13631
|
-
|
13632
|
-
|
13663
|
+
|
13664
|
+
<xsl:if test="*[local-name() = 'strong']">
|
13665
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
13666
|
+
</xsl:if>
|
13667
|
+
|
13633
13668
|
</xsl:template>
|
13634
13669
|
|
13635
13670
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -13639,6 +13674,17 @@
|
|
13639
13674
|
</xsl:template>
|
13640
13675
|
<!-- End Preferred, admitted, deprecated -->
|
13641
13676
|
|
13677
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
13678
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
13679
|
+
<xsl:apply-templates/>
|
13680
|
+
</fo:block>
|
13681
|
+
</xsl:template>
|
13682
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
13683
|
+
<fo:block>
|
13684
|
+
<xsl:apply-templates/>
|
13685
|
+
</fo:block>
|
13686
|
+
</xsl:template>
|
13687
|
+
|
13642
13688
|
<!-- ========== -->
|
13643
13689
|
<!-- definition -->
|
13644
13690
|
<!-- ========== -->
|
@@ -14544,6 +14590,7 @@
|
|
14544
14590
|
|
14545
14591
|
<!-- Normative references -->
|
14546
14592
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
14593
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
14547
14594
|
|
14548
14595
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
14549
14596
|
|
@@ -15259,7 +15306,8 @@
|
|
15259
15306
|
<!-- add @id - first element with @id plus '_element_name' -->
|
15260
15307
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
15261
15308
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
15262
|
-
<xsl:
|
15309
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
15310
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
15263
15311
|
</xsl:if>
|
15264
15312
|
</xsl:template>
|
15265
15313
|
|
@@ -15316,6 +15364,31 @@
|
|
15316
15364
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
15317
15365
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
15318
15366
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
15367
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
15368
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
15369
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
15370
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
15371
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
15372
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
15373
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
15374
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
15375
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
15376
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
15377
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
15378
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
15379
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
15380
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
15381
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
15382
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
15383
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
15384
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
15385
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
15386
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
15387
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
15388
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
15389
|
+
|
15390
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
15391
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
15319
15392
|
|
15320
15393
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
15321
15394
|
<xsl:copy>
|
@@ -15360,6 +15433,94 @@
|
|
15360
15433
|
</xsl:element>
|
15361
15434
|
</xsl:template>
|
15362
15435
|
|
15436
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
15437
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15438
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15439
|
+
</xsl:template>
|
15440
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
15441
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
15442
|
+
<xsl:copy-of select="@*"/>
|
15443
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15444
|
+
</xsl:element>
|
15445
|
+
</xsl:template>
|
15446
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15447
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15448
|
+
</xsl:template>
|
15449
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
15450
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
15451
|
+
<xsl:copy-of select="@*"/>
|
15452
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15453
|
+
</xsl:element>
|
15454
|
+
</xsl:template>
|
15455
|
+
|
15456
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
15457
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15458
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15459
|
+
</xsl:template>
|
15460
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
15461
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
15462
|
+
<xsl:copy-of select="@*"/>
|
15463
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15464
|
+
</xsl:element>
|
15465
|
+
</xsl:template>
|
15466
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15467
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15468
|
+
</xsl:template>
|
15469
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
15470
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
15471
|
+
<xsl:copy-of select="@*"/>
|
15472
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15473
|
+
</xsl:element>
|
15474
|
+
</xsl:template>
|
15475
|
+
|
15476
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
15477
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
15478
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15479
|
+
</xsl:template>
|
15480
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
15481
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
15482
|
+
<xsl:copy-of select="@*"/>
|
15483
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15484
|
+
</xsl:element>
|
15485
|
+
</xsl:template>
|
15486
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
15487
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15488
|
+
</xsl:template>
|
15489
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
15490
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
15491
|
+
<xsl:copy-of select="@*"/>
|
15492
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15493
|
+
</xsl:element>
|
15494
|
+
</xsl:template>
|
15495
|
+
|
15496
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
15497
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
15498
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
15499
|
+
<xsl:copy-of select="@*"/>
|
15500
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15501
|
+
</xsl:element>
|
15502
|
+
</xsl:template>
|
15503
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
15504
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
15505
|
+
<xsl:copy-of select="@*"/>
|
15506
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15507
|
+
</xsl:element>
|
15508
|
+
</xsl:template>
|
15509
|
+
|
15510
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
15511
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
15512
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
15513
|
+
<xsl:copy-of select="@*"/>
|
15514
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
15515
|
+
</xsl:element>
|
15516
|
+
</xsl:template>
|
15517
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
15518
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
15519
|
+
<xsl:copy-of select="@*"/>
|
15520
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
15521
|
+
</xsl:element>
|
15522
|
+
</xsl:template>
|
15523
|
+
|
15363
15524
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
15364
15525
|
<xsl:apply-templates mode="update_xml_step1"/>
|
15365
15526
|
</xsl:template>
|
@@ -16498,7 +16659,7 @@
|
|
16498
16659
|
</xsl:template>
|
16499
16660
|
|
16500
16661
|
<xsl:template name="namespaceCheck">
|
16501
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
16662
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
16502
16663
|
<xsl:variable name="XSLNS">
|
16503
16664
|
|
16504
16665
|
<xsl:value-of select="document('')//*/namespace::bipm"/>
|
@@ -16588,6 +16749,9 @@
|
|
16588
16749
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
16589
16750
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16590
16751
|
</xsl:when>
|
16752
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
16753
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16754
|
+
</xsl:when>
|
16591
16755
|
<xsl:when test="$formatted = 'true'">
|
16592
16756
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
16593
16757
|
</xsl:when>
|