metanorma-bipm 2.5.10 → 2.5.12
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 +181 -15
- data/lib/isodoc/bipm/bipm.guide.xsl +181 -15
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +181 -15
- data/lib/isodoc/bipm/bipm.rapport.xsl +181 -15
- data/lib/isodoc/bipm/jcgm.standard.xsl +249 -20
- data/lib/isodoc/bipm/presentation_xml_convert.rb +7 -2
- data/lib/metanorma/bipm/biblio.rng +5 -3
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -1524,8 +1524,9 @@
|
|
1524
1524
|
</xsl:template>
|
1525
1525
|
|
1526
1526
|
<!-- allow cross-align for element title -->
|
1527
|
-
<xsl:template match="jcgm:sections//jcgm:title | jcgm:annex//jcgm:title" mode="flatxml_step1"
|
1528
|
-
|
1527
|
+
<xsl:template match="jcgm:sections//jcgm:title | jcgm:annex//jcgm:title" mode="flatxml_step1"/>
|
1528
|
+
<xsl:template match="jcgm:sections//jcgm:fmt-title | jcgm:annex//jcgm:fmt-title" mode="flatxml_step1">
|
1529
|
+
<xsl:element name="title" namespace="{$namespace_full}">
|
1529
1530
|
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1530
1531
|
<xsl:call-template name="setCrossAlignAttributes"/>
|
1531
1532
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -1536,7 +1537,7 @@
|
|
1536
1537
|
<xsl:copy-of select="../@inline-header"/>
|
1537
1538
|
</xsl:if>
|
1538
1539
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1539
|
-
</xsl:
|
1540
|
+
</xsl:element>
|
1540
1541
|
</xsl:template>
|
1541
1542
|
|
1542
1543
|
<xsl:template match="*[local-name()='annex']" mode="flatxml_step1">
|
@@ -1613,7 +1614,8 @@
|
|
1613
1614
|
<term><name>...</name></term>
|
1614
1615
|
To:
|
1615
1616
|
<term><term_name>...</term_name></term> -->
|
1616
|
-
<xsl:template match="jcgm:term/jcgm:name" mode="flatxml_step1"
|
1617
|
+
<xsl:template match="jcgm:term/jcgm:name" mode="flatxml_step1"/>
|
1618
|
+
<xsl:template match="jcgm:term/jcgm:fmt-name" mode="flatxml_step1">
|
1617
1619
|
<xsl:element name="term_name" namespace="https://www.metanorma.org/ns/bipm">
|
1618
1620
|
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1619
1621
|
<xsl:call-template name="setCrossAlignAttributes"/>
|
@@ -1640,7 +1642,8 @@
|
|
1640
1642
|
</xsl:template>
|
1641
1643
|
|
1642
1644
|
<!-- allow cross-align for element p, note, termsource, table, figure, li (and set label) -->
|
1643
|
-
<xsl:template match="jcgm:sections//jcgm:
|
1645
|
+
<xsl:template match="jcgm:sections//jcgm:termsource | jcgm:annex//jcgm:termsource" mode="flatxml_step1"/>
|
1646
|
+
<xsl:template match="jcgm:sections//jcgm:p | jcgm:sections//jcgm:note | jcgm:sections//jcgm:li | jcgm:table | jcgm:figure | jcgm:annex//jcgm:p | jcgm:annex//jcgm:note | jcgm:annex//jcgm:li" mode="flatxml_step1">
|
1644
1647
|
<xsl:copy>
|
1645
1648
|
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1646
1649
|
<xsl:call-template name="setCrossAlignAttributes"/>
|
@@ -1650,6 +1653,66 @@
|
|
1650
1653
|
<xsl:apply-templates mode="flatxml_step1"/>
|
1651
1654
|
</xsl:copy>
|
1652
1655
|
</xsl:template>
|
1656
|
+
<xsl:template match="jcgm:sections//jcgm:fmt-termsource | jcgm:annex//jcgm:fmt-termsource" mode="flatxml_step1">
|
1657
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
1658
|
+
<xsl:apply-templates select="@*" mode="flatxml_step1"/>
|
1659
|
+
<xsl:call-template name="setCrossAlignAttributes"/>
|
1660
|
+
<xsl:if test="local-name() = 'li'">
|
1661
|
+
<xsl:call-template name="setListItemLabel"/>
|
1662
|
+
</xsl:if>
|
1663
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1664
|
+
</xsl:element>
|
1665
|
+
</xsl:template>
|
1666
|
+
|
1667
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="flatxml_step1"/>
|
1668
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="flatxml_step1"/>
|
1669
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="flatxml_step1"/>
|
1670
|
+
<xsl:template match="*[local-name() = 'related']" mode="flatxml_step1"/>
|
1671
|
+
<xsl:template match="*[local-name() = 'definition']" mode="flatxml_step1"/>
|
1672
|
+
|
1673
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="flatxml_step1">
|
1674
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1675
|
+
</xsl:template>
|
1676
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="flatxml_step1">
|
1677
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
1678
|
+
<xsl:copy-of select="@*"/>
|
1679
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1680
|
+
</xsl:element>
|
1681
|
+
</xsl:template>
|
1682
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="flatxml_step1">
|
1683
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1684
|
+
</xsl:template>
|
1685
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="flatxml_step1">
|
1686
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
1687
|
+
<xsl:copy-of select="@*"/>
|
1688
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1689
|
+
</xsl:element>
|
1690
|
+
</xsl:template>
|
1691
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="flatxml_step1">
|
1692
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1693
|
+
</xsl:template>
|
1694
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="flatxml_step1">
|
1695
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
1696
|
+
<xsl:copy-of select="@*"/>
|
1697
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1698
|
+
</xsl:element>
|
1699
|
+
</xsl:template>
|
1700
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="flatxml_step1">
|
1701
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
1702
|
+
<xsl:copy-of select="@*"/>
|
1703
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1704
|
+
</xsl:element>
|
1705
|
+
</xsl:template>
|
1706
|
+
|
1707
|
+
<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="flatxml_step1" priority="3">
|
1708
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1709
|
+
</xsl:template>
|
1710
|
+
|
1711
|
+
<xsl:template match="*[local-name() = 'semx']" mode="flatxml_step1">
|
1712
|
+
<xsl:apply-templates mode="flatxml_step1"/>
|
1713
|
+
</xsl:template>
|
1714
|
+
|
1715
|
+
<xsl:template match="*[local-name() = 'fmt-xref-label']" mode="flatxml_step1"/>
|
1653
1716
|
|
1654
1717
|
<xsl:template name="setCrossAlignAttributes">
|
1655
1718
|
<xsl:variable name="is_cross_aligned">
|
@@ -3006,6 +3069,9 @@
|
|
3006
3069
|
|
3007
3070
|
</xsl:attribute-set>
|
3008
3071
|
|
3072
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
3073
|
+
</xsl:attribute-set>
|
3074
|
+
|
3009
3075
|
<xsl:attribute-set name="definition-style">
|
3010
3076
|
|
3011
3077
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -5299,7 +5365,9 @@
|
|
5299
5365
|
<xsl:with-param name="element">
|
5300
5366
|
<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 -->
|
5301
5367
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
5368
|
+
|
5302
5369
|
<xsl:copy-of select="$current_fn_number_text"/>
|
5370
|
+
|
5303
5371
|
</fo:inline>
|
5304
5372
|
</fo:basic-link>
|
5305
5373
|
</xsl:with-param>
|
@@ -5318,8 +5386,7 @@
|
|
5318
5386
|
|
5319
5387
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
5320
5388
|
|
5321
|
-
<
|
5322
|
-
|
5389
|
+
<xsl:variable name="fn_block">
|
5323
5390
|
<xsl:call-template name="refine_fn-body-style"/>
|
5324
5391
|
|
5325
5392
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -5327,9 +5394,15 @@
|
|
5327
5394
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
5328
5395
|
|
5329
5396
|
<xsl:value-of select="$current_fn_number_text"/>
|
5397
|
+
|
5330
5398
|
</fo:inline>
|
5331
5399
|
<xsl:apply-templates/>
|
5332
|
-
</
|
5400
|
+
</xsl:variable>
|
5401
|
+
|
5402
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
5403
|
+
<xsl:copy-of select="$fn_block"/>
|
5404
|
+
</fo:block>
|
5405
|
+
|
5333
5406
|
</fo:block-container>
|
5334
5407
|
</fo:footnote-body>
|
5335
5408
|
</fo:footnote>
|
@@ -7113,9 +7186,14 @@
|
|
7113
7186
|
|
7114
7187
|
<xsl:variable name="simple-table">
|
7115
7188
|
|
7189
|
+
<xsl:variable name="table_without_semantic_elements">
|
7190
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
7191
|
+
</xsl:variable>
|
7192
|
+
|
7116
7193
|
<!-- Step 0. replace <br/> to <p>...</p> -->
|
7117
7194
|
<xsl:variable name="table_without_br">
|
7118
|
-
<xsl:apply-templates mode="table-without-br"/>
|
7195
|
+
<!-- <xsl:apply-templates mode="table-without-br"/> -->
|
7196
|
+
<xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
|
7119
7197
|
</xsl:variable>
|
7120
7198
|
|
7121
7199
|
<!-- Step 1. colspan processing -->
|
@@ -11391,14 +11469,17 @@
|
|
11391
11469
|
</fo:block>
|
11392
11470
|
</xsl:template>
|
11393
11471
|
|
11394
|
-
<xsl:template match="*[local-name() = 'domain']">
|
11472
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
11395
11473
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
11396
11474
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
11397
11475
|
<xsl:text> </xsl:text> -->
|
11398
|
-
<xsl:if test="not(@hidden = 'true')">
|
11476
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
11399
11477
|
<xsl:apply-templates/>
|
11400
11478
|
</xsl:if>
|
11401
|
-
</xsl:template>
|
11479
|
+
</xsl:template> -->
|
11480
|
+
|
11481
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
11482
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
11402
11483
|
|
11403
11484
|
<xsl:template match="*[local-name() = 'admitted']">
|
11404
11485
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -11413,9 +11494,11 @@
|
|
11413
11494
|
</xsl:template>
|
11414
11495
|
|
11415
11496
|
<xsl:template name="setStyle_preferred">
|
11416
|
-
|
11417
|
-
|
11418
|
-
|
11497
|
+
|
11498
|
+
<xsl:if test="*[local-name() = 'strong']">
|
11499
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
11500
|
+
</xsl:if>
|
11501
|
+
|
11419
11502
|
</xsl:template>
|
11420
11503
|
|
11421
11504
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -11425,6 +11508,17 @@
|
|
11425
11508
|
</xsl:template>
|
11426
11509
|
<!-- End Preferred, admitted, deprecated -->
|
11427
11510
|
|
11511
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
11512
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
11513
|
+
<xsl:apply-templates/>
|
11514
|
+
</fo:block>
|
11515
|
+
</xsl:template>
|
11516
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
11517
|
+
<fo:block>
|
11518
|
+
<xsl:apply-templates/>
|
11519
|
+
</fo:block>
|
11520
|
+
</xsl:template>
|
11521
|
+
|
11428
11522
|
<!-- ========== -->
|
11429
11523
|
<!-- definition -->
|
11430
11524
|
<!-- ========== -->
|
@@ -12333,6 +12427,7 @@
|
|
12333
12427
|
|
12334
12428
|
<!-- Normative references -->
|
12335
12429
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12430
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12336
12431
|
|
12337
12432
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12338
12433
|
|
@@ -13059,7 +13154,8 @@
|
|
13059
13154
|
<!-- add @id - first element with @id plus '_element_name' -->
|
13060
13155
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
13061
13156
|
<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>
|
13062
|
-
<xsl:
|
13157
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
13158
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
13063
13159
|
</xsl:if>
|
13064
13160
|
</xsl:template>
|
13065
13161
|
|
@@ -13116,6 +13212,31 @@
|
|
13116
13212
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
13117
13213
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
13118
13214
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
13215
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
13216
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
13217
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
13218
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
13219
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
13220
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
13221
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
13222
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
13223
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
13224
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
13225
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
13226
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
13227
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
13228
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
13229
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
13230
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
13231
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
13232
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
13233
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
13234
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
13235
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
13236
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
13237
|
+
|
13238
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
13239
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
13119
13240
|
|
13120
13241
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
13121
13242
|
<xsl:copy>
|
@@ -13148,13 +13269,115 @@
|
|
13148
13269
|
|
13149
13270
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13150
13271
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13151
|
-
<xsl:
|
13272
|
+
<xsl:choose>
|
13273
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13274
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13275
|
+
</xsl:when>
|
13276
|
+
<xsl:otherwise>
|
13277
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13278
|
+
<xsl:copy-of select="@*"/>
|
13279
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13280
|
+
</xsl:element>
|
13281
|
+
</xsl:otherwise>
|
13282
|
+
</xsl:choose>
|
13283
|
+
</xsl:template>
|
13284
|
+
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
13285
|
+
<xsl:choose>
|
13286
|
+
<xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
|
13287
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13288
|
+
</xsl:when>
|
13289
|
+
<xsl:otherwise>
|
13290
|
+
<xsl:element name="name" namespace="{$namespace_full}">
|
13291
|
+
<xsl:copy-of select="@*"/>
|
13292
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13293
|
+
</xsl:element>
|
13294
|
+
</xsl:otherwise>
|
13295
|
+
</xsl:choose>
|
13296
|
+
</xsl:template>
|
13297
|
+
|
13298
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
13299
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13300
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13301
|
+
</xsl:template>
|
13302
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
13303
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
13152
13304
|
<xsl:copy-of select="@*"/>
|
13153
13305
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13154
13306
|
</xsl:element>
|
13155
13307
|
</xsl:template>
|
13156
|
-
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
|
13157
|
-
<xsl:
|
13308
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13309
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13310
|
+
</xsl:template>
|
13311
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
13312
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
13313
|
+
<xsl:copy-of select="@*"/>
|
13314
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13315
|
+
</xsl:element>
|
13316
|
+
</xsl:template>
|
13317
|
+
|
13318
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
13319
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13320
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13321
|
+
</xsl:template>
|
13322
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
13323
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
13324
|
+
<xsl:copy-of select="@*"/>
|
13325
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13326
|
+
</xsl:element>
|
13327
|
+
</xsl:template>
|
13328
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13329
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13330
|
+
</xsl:template>
|
13331
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
13332
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
13333
|
+
<xsl:copy-of select="@*"/>
|
13334
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13335
|
+
</xsl:element>
|
13336
|
+
</xsl:template>
|
13337
|
+
|
13338
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
13339
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13340
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13341
|
+
</xsl:template>
|
13342
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
13343
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
13344
|
+
<xsl:copy-of select="@*"/>
|
13345
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13346
|
+
</xsl:element>
|
13347
|
+
</xsl:template>
|
13348
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
13349
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13350
|
+
</xsl:template>
|
13351
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
13352
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
13353
|
+
<xsl:copy-of select="@*"/>
|
13354
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13355
|
+
</xsl:element>
|
13356
|
+
</xsl:template>
|
13357
|
+
|
13358
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
13359
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
13360
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
13361
|
+
<xsl:copy-of select="@*"/>
|
13362
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13363
|
+
</xsl:element>
|
13364
|
+
</xsl:template>
|
13365
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
13366
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
13367
|
+
<xsl:copy-of select="@*"/>
|
13368
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13369
|
+
</xsl:element>
|
13370
|
+
</xsl:template>
|
13371
|
+
|
13372
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
13373
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
13374
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
13375
|
+
<xsl:copy-of select="@*"/>
|
13376
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13377
|
+
</xsl:element>
|
13378
|
+
</xsl:template>
|
13379
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
13380
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
13158
13381
|
<xsl:copy-of select="@*"/>
|
13159
13382
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13160
13383
|
</xsl:element>
|
@@ -13167,6 +13390,9 @@
|
|
13167
13390
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13168
13391
|
</xsl:template>
|
13169
13392
|
|
13393
|
+
<xsl:template match="*[local-name() = 'semx']">
|
13394
|
+
<xsl:apply-templates/>
|
13395
|
+
</xsl:template>
|
13170
13396
|
<xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
|
13171
13397
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13172
13398
|
</xsl:template>
|
@@ -14289,7 +14515,7 @@
|
|
14289
14515
|
</xsl:template>
|
14290
14516
|
|
14291
14517
|
<xsl:template name="namespaceCheck">
|
14292
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
14518
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
14293
14519
|
<xsl:variable name="XSLNS">
|
14294
14520
|
|
14295
14521
|
<xsl:value-of select="document('')//*/namespace::bipm"/>
|
@@ -14379,6 +14605,9 @@
|
|
14379
14605
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
14380
14606
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14381
14607
|
</xsl:when>
|
14608
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
14609
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14610
|
+
</xsl:when>
|
14382
14611
|
<xsl:when test="$formatted = 'true'">
|
14383
14612
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
14384
14613
|
</xsl:when>
|
@@ -128,7 +128,7 @@ module IsoDoc
|
|
128
128
|
def extract_brackets(node)
|
129
129
|
start = node.at("./text()[1]")
|
130
130
|
finish = node.at("./text()[last()]")
|
131
|
-
(/^\[/.match?(start
|
131
|
+
(/^\[/.match?(start&.text) && /\]$/.match?(finish&.text)) or return
|
132
132
|
start.replace(start.text[1..-1])
|
133
133
|
node.previous = "["
|
134
134
|
finish = node.at("./text()[last()]")
|
@@ -143,7 +143,8 @@ module IsoDoc
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
-
|
146
|
+
# KILL
|
147
|
+
def termsource1_xx(elem)
|
147
148
|
# elem["status"] == "modified" and return super
|
148
149
|
while elem&.next_element&.name == "termsource"
|
149
150
|
elem << "; #{to_xml(elem.next_element.remove.children)}"
|
@@ -152,6 +153,10 @@ module IsoDoc
|
|
152
153
|
"#{to_xml(elem.children).strip}]")
|
153
154
|
end
|
154
155
|
|
156
|
+
def termsource_label(elem, sources)
|
157
|
+
elem.replace(l10n("[#{termsource_adapt(elem['status'])} #{sources}]"))
|
158
|
+
end
|
159
|
+
|
155
160
|
def termsource_adapt(status)
|
156
161
|
case status
|
157
162
|
when "adapted" then @i18n.adapted_from
|
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
947
947
|
typically cited as "personal communication")</a:documentation>
|
948
948
|
<value>conversation</value>
|
949
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
950
952
|
<value>misc</value>
|
951
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
952
954
|
</choice>
|
@@ -1277,17 +1279,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
1277
1279
|
</define>
|
1278
1280
|
<define name="validityBegins">
|
1279
1281
|
<element name="validityBegins">
|
1280
|
-
<ref name="
|
1282
|
+
<ref name="ISO8601Date"/>
|
1281
1283
|
</element>
|
1282
1284
|
</define>
|
1283
1285
|
<define name="validityEnds">
|
1284
1286
|
<element name="validityEnds">
|
1285
|
-
<ref name="
|
1287
|
+
<ref name="ISO8601Date"/>
|
1286
1288
|
</element>
|
1287
1289
|
</define>
|
1288
1290
|
<define name="validityRevision">
|
1289
1291
|
<element name="revision">
|
1290
|
-
<ref name="
|
1292
|
+
<ref name="ISO8601Date"/>
|
1291
1293
|
</element>
|
1292
1294
|
</define>
|
1293
1295
|
<define name="TypedTitleString">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|