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.
@@ -5186,6 +5186,9 @@
5186
5186
 
5187
5187
  </xsl:attribute-set>
5188
5188
 
5189
+ <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5190
+ </xsl:attribute-set>
5191
+
5189
5192
  <xsl:attribute-set name="definition-style">
5190
5193
 
5191
5194
  </xsl:attribute-set>
@@ -7484,7 +7487,9 @@
7484
7487
  <xsl:with-param name="element">
7485
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 -->
7486
7489
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
7490
+
7487
7491
  <xsl:copy-of select="$current_fn_number_text"/>
7492
+
7488
7493
  </fo:inline>
7489
7494
  </fo:basic-link>
7490
7495
  </xsl:with-param>
@@ -7503,8 +7508,7 @@
7503
7508
 
7504
7509
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
7505
7510
 
7506
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
7507
-
7511
+ <xsl:variable name="fn_block">
7508
7512
  <xsl:call-template name="refine_fn-body-style"/>
7509
7513
 
7510
7514
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
@@ -7512,9 +7516,15 @@
7512
7516
  <xsl:call-template name="refine_fn-body-num-style"/>
7513
7517
 
7514
7518
  <xsl:value-of select="$current_fn_number_text"/>
7519
+
7515
7520
  </fo:inline>
7516
7521
  <xsl:apply-templates/>
7517
- </fo:block>
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
+
7518
7528
  </fo:block-container>
7519
7529
  </fo:footnote-body>
7520
7530
  </fo:footnote>
@@ -9290,9 +9300,14 @@
9290
9300
 
9291
9301
  <xsl:variable name="simple-table">
9292
9302
 
9303
+ <xsl:variable name="table_without_semantic_elements">
9304
+ <xsl:apply-templates mode="update_xml_pres"/>
9305
+ </xsl:variable>
9306
+
9293
9307
  <!-- Step 0. replace <br/> to <p>...</p> -->
9294
9308
  <xsl:variable name="table_without_br">
9295
- <xsl:apply-templates mode="table-without-br"/>
9309
+ <!-- <xsl:apply-templates mode="table-without-br"/> -->
9310
+ <xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
9296
9311
  </xsl:variable>
9297
9312
 
9298
9313
  <!-- Step 1. colspan processing -->
@@ -13625,14 +13640,17 @@
13625
13640
  </fo:block>
13626
13641
  </xsl:template>
13627
13642
 
13628
- <xsl:template match="*[local-name() = 'domain']">
13643
+ <!-- <xsl:template match="*[local-name() = 'domain']"> -->
13629
13644
  <!-- https://github.com/metanorma/isodoc/issues/607
13630
13645
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
13631
13646
  <xsl:text> </xsl:text> -->
13632
- <xsl:if test="not(@hidden = 'true')">
13647
+ <!-- <xsl:if test="not(@hidden = 'true')">
13633
13648
  <xsl:apply-templates/>
13634
13649
  </xsl:if>
13635
- </xsl:template>
13650
+ </xsl:template> -->
13651
+
13652
+ <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
13653
+ <xsl:template match="*[local-name() = 'domain']"/>
13636
13654
 
13637
13655
  <xsl:template match="*[local-name() = 'admitted']">
13638
13656
  <fo:block xsl:use-attribute-sets="admitted-style">
@@ -13647,9 +13665,11 @@
13647
13665
  </xsl:template>
13648
13666
 
13649
13667
  <xsl:template name="setStyle_preferred">
13650
- <xsl:if test="*[local-name() = 'strong']">
13651
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13652
- </xsl:if>
13668
+
13669
+ <xsl:if test="*[local-name() = 'strong']">
13670
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
13671
+ </xsl:if>
13672
+
13653
13673
  </xsl:template>
13654
13674
 
13655
13675
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -13659,6 +13679,17 @@
13659
13679
  </xsl:template>
13660
13680
  <!-- End Preferred, admitted, deprecated -->
13661
13681
 
13682
+ <xsl:template match="*[local-name() = 'fmt-related']">
13683
+ <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
13684
+ <xsl:apply-templates/>
13685
+ </fo:block>
13686
+ </xsl:template>
13687
+ <xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
13688
+ <fo:block>
13689
+ <xsl:apply-templates/>
13690
+ </fo:block>
13691
+ </xsl:template>
13692
+
13662
13693
  <!-- ========== -->
13663
13694
  <!-- definition -->
13664
13695
  <!-- ========== -->
@@ -14564,6 +14595,7 @@
14564
14595
 
14565
14596
  <!-- Normative references -->
14566
14597
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
14598
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14567
14599
 
14568
14600
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14569
14601
 
@@ -15279,7 +15311,8 @@
15279
15311
  <!-- add @id - first element with @id plus '_element_name' -->
15280
15312
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
15281
15313
  <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>
15282
- <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
15314
+ <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
15315
+ <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
15283
15316
  </xsl:if>
15284
15317
  </xsl:template>
15285
15318
 
@@ -15336,6 +15369,31 @@
15336
15369
  <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
15337
15370
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
15338
15371
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
15372
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
15373
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
15374
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
15375
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
15376
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
15377
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
15378
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
15379
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
15380
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
15381
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
15382
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
15383
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
15384
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
15385
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
15386
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
15387
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
15388
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
15389
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
15390
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
15391
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
15392
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
15393
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
15394
+
15395
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
15396
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
15339
15397
 
15340
15398
  <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
15341
15399
  <xsl:copy>
@@ -15368,13 +15426,115 @@
15368
15426
 
15369
15427
  <xsl:template match="*[local-name() = 'fmt-name']"/>
15370
15428
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
15371
- <xsl:element name="name" namespace="{$namespace_full}">
15429
+ <xsl:choose>
15430
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
15431
+ <xsl:apply-templates mode="update_xml_step1"/>
15432
+ </xsl:when>
15433
+ <xsl:otherwise>
15434
+ <xsl:element name="name" namespace="{$namespace_full}">
15435
+ <xsl:copy-of select="@*"/>
15436
+ <xsl:apply-templates mode="update_xml_step1"/>
15437
+ </xsl:element>
15438
+ </xsl:otherwise>
15439
+ </xsl:choose>
15440
+ </xsl:template>
15441
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
15442
+ <xsl:choose>
15443
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
15444
+ <xsl:apply-templates mode="update_xml_step1"/>
15445
+ </xsl:when>
15446
+ <xsl:otherwise>
15447
+ <xsl:element name="name" namespace="{$namespace_full}">
15448
+ <xsl:copy-of select="@*"/>
15449
+ <xsl:apply-templates mode="update_xml_pres"/>
15450
+ </xsl:element>
15451
+ </xsl:otherwise>
15452
+ </xsl:choose>
15453
+ </xsl:template>
15454
+
15455
+ <xsl:template match="*[local-name() = 'fmt-preferred']"/>
15456
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
15457
+ <xsl:apply-templates mode="update_xml_step1"/>
15458
+ </xsl:template>
15459
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
15460
+ <xsl:element name="preferred" namespace="{$namespace_full}">
15372
15461
  <xsl:copy-of select="@*"/>
15373
15462
  <xsl:apply-templates mode="update_xml_step1"/>
15374
15463
  </xsl:element>
15375
15464
  </xsl:template>
15376
- <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
15377
- <xsl:element name="name" namespace="{$namespace_full}">
15465
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
15466
+ <xsl:apply-templates mode="update_xml_pres"/>
15467
+ </xsl:template>
15468
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
15469
+ <xsl:element name="preferred" namespace="{$namespace_full}">
15470
+ <xsl:copy-of select="@*"/>
15471
+ <xsl:apply-templates mode="update_xml_pres"/>
15472
+ </xsl:element>
15473
+ </xsl:template>
15474
+
15475
+ <xsl:template match="*[local-name() = 'fmt-admitted']"/>
15476
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
15477
+ <xsl:apply-templates mode="update_xml_step1"/>
15478
+ </xsl:template>
15479
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
15480
+ <xsl:element name="admitted" namespace="{$namespace_full}">
15481
+ <xsl:copy-of select="@*"/>
15482
+ <xsl:apply-templates mode="update_xml_step1"/>
15483
+ </xsl:element>
15484
+ </xsl:template>
15485
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
15486
+ <xsl:apply-templates mode="update_xml_pres"/>
15487
+ </xsl:template>
15488
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
15489
+ <xsl:element name="admitted" namespace="{$namespace_full}">
15490
+ <xsl:copy-of select="@*"/>
15491
+ <xsl:apply-templates mode="update_xml_pres"/>
15492
+ </xsl:element>
15493
+ </xsl:template>
15494
+
15495
+ <xsl:template match="*[local-name() = 'fmt-deprecates']"/>
15496
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
15497
+ <xsl:apply-templates mode="update_xml_step1"/>
15498
+ </xsl:template>
15499
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
15500
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
15501
+ <xsl:copy-of select="@*"/>
15502
+ <xsl:apply-templates mode="update_xml_step1"/>
15503
+ </xsl:element>
15504
+ </xsl:template>
15505
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
15506
+ <xsl:apply-templates mode="update_xml_pres"/>
15507
+ </xsl:template>
15508
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
15509
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
15510
+ <xsl:copy-of select="@*"/>
15511
+ <xsl:apply-templates mode="update_xml_pres"/>
15512
+ </xsl:element>
15513
+ </xsl:template>
15514
+
15515
+ <xsl:template match="*[local-name() = 'fmt-definition']"/>
15516
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
15517
+ <xsl:element name="definition" namespace="{$namespace_full}">
15518
+ <xsl:copy-of select="@*"/>
15519
+ <xsl:apply-templates mode="update_xml_step1"/>
15520
+ </xsl:element>
15521
+ </xsl:template>
15522
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
15523
+ <xsl:element name="definition" namespace="{$namespace_full}">
15524
+ <xsl:copy-of select="@*"/>
15525
+ <xsl:apply-templates mode="update_xml_pres"/>
15526
+ </xsl:element>
15527
+ </xsl:template>
15528
+
15529
+ <xsl:template match="*[local-name() = 'fmt-termsource']"/>
15530
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
15531
+ <xsl:element name="termsource" namespace="{$namespace_full}">
15532
+ <xsl:copy-of select="@*"/>
15533
+ <xsl:apply-templates mode="update_xml_step1"/>
15534
+ </xsl:element>
15535
+ </xsl:template>
15536
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
15537
+ <xsl:element name="termsource" namespace="{$namespace_full}">
15378
15538
  <xsl:copy-of select="@*"/>
15379
15539
  <xsl:apply-templates mode="update_xml_pres"/>
15380
15540
  </xsl:element>
@@ -15387,6 +15547,9 @@
15387
15547
  <xsl:apply-templates mode="update_xml_pres"/>
15388
15548
  </xsl:template>
15389
15549
 
15550
+ <xsl:template match="*[local-name() = 'semx']">
15551
+ <xsl:apply-templates/>
15552
+ </xsl:template>
15390
15553
  <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
15391
15554
  <xsl:apply-templates mode="update_xml_step1"/>
15392
15555
  </xsl:template>
@@ -16518,7 +16681,7 @@
16518
16681
  </xsl:template>
16519
16682
 
16520
16683
  <xsl:template name="namespaceCheck">
16521
- <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
16684
+ <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
16522
16685
  <xsl:variable name="XSLNS">
16523
16686
 
16524
16687
  <xsl:value-of select="document('')//*/namespace::bipm"/>
@@ -16608,6 +16771,9 @@
16608
16771
  <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
16609
16772
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16610
16773
  </xsl:when>
16774
+ <xsl:when test="string-length($bibdata_updated) != ''">
16775
+ <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16776
+ </xsl:when>
16611
16777
  <xsl:when test="$formatted = 'true'">
16612
16778
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16613
16779
  </xsl:when>
@@ -5186,6 +5186,9 @@
5186
5186
 
5187
5187
  </xsl:attribute-set>
5188
5188
 
5189
+ <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
5190
+ </xsl:attribute-set>
5191
+
5189
5192
  <xsl:attribute-set name="definition-style">
5190
5193
 
5191
5194
  </xsl:attribute-set>
@@ -7484,7 +7487,9 @@
7484
7487
  <xsl:with-param name="element">
7485
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 -->
7486
7489
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
7490
+
7487
7491
  <xsl:copy-of select="$current_fn_number_text"/>
7492
+
7488
7493
  </fo:inline>
7489
7494
  </fo:basic-link>
7490
7495
  </xsl:with-param>
@@ -7503,8 +7508,7 @@
7503
7508
 
7504
7509
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
7505
7510
 
7506
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
7507
-
7511
+ <xsl:variable name="fn_block">
7508
7512
  <xsl:call-template name="refine_fn-body-style"/>
7509
7513
 
7510
7514
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
@@ -7512,9 +7516,15 @@
7512
7516
  <xsl:call-template name="refine_fn-body-num-style"/>
7513
7517
 
7514
7518
  <xsl:value-of select="$current_fn_number_text"/>
7519
+
7515
7520
  </fo:inline>
7516
7521
  <xsl:apply-templates/>
7517
- </fo:block>
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
+
7518
7528
  </fo:block-container>
7519
7529
  </fo:footnote-body>
7520
7530
  </fo:footnote>
@@ -9290,9 +9300,14 @@
9290
9300
 
9291
9301
  <xsl:variable name="simple-table">
9292
9302
 
9303
+ <xsl:variable name="table_without_semantic_elements">
9304
+ <xsl:apply-templates mode="update_xml_pres"/>
9305
+ </xsl:variable>
9306
+
9293
9307
  <!-- Step 0. replace <br/> to <p>...</p> -->
9294
9308
  <xsl:variable name="table_without_br">
9295
- <xsl:apply-templates mode="table-without-br"/>
9309
+ <!-- <xsl:apply-templates mode="table-without-br"/> -->
9310
+ <xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
9296
9311
  </xsl:variable>
9297
9312
 
9298
9313
  <!-- Step 1. colspan processing -->
@@ -13625,14 +13640,17 @@
13625
13640
  </fo:block>
13626
13641
  </xsl:template>
13627
13642
 
13628
- <xsl:template match="*[local-name() = 'domain']">
13643
+ <!-- <xsl:template match="*[local-name() = 'domain']"> -->
13629
13644
  <!-- https://github.com/metanorma/isodoc/issues/607
13630
13645
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
13631
13646
  <xsl:text> </xsl:text> -->
13632
- <xsl:if test="not(@hidden = 'true')">
13647
+ <!-- <xsl:if test="not(@hidden = 'true')">
13633
13648
  <xsl:apply-templates/>
13634
13649
  </xsl:if>
13635
- </xsl:template>
13650
+ </xsl:template> -->
13651
+
13652
+ <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
13653
+ <xsl:template match="*[local-name() = 'domain']"/>
13636
13654
 
13637
13655
  <xsl:template match="*[local-name() = 'admitted']">
13638
13656
  <fo:block xsl:use-attribute-sets="admitted-style">
@@ -13647,9 +13665,11 @@
13647
13665
  </xsl:template>
13648
13666
 
13649
13667
  <xsl:template name="setStyle_preferred">
13650
- <xsl:if test="*[local-name() = 'strong']">
13651
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13652
- </xsl:if>
13668
+
13669
+ <xsl:if test="*[local-name() = 'strong']">
13670
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
13671
+ </xsl:if>
13672
+
13653
13673
  </xsl:template>
13654
13674
 
13655
13675
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -13659,6 +13679,17 @@
13659
13679
  </xsl:template>
13660
13680
  <!-- End Preferred, admitted, deprecated -->
13661
13681
 
13682
+ <xsl:template match="*[local-name() = 'fmt-related']">
13683
+ <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
13684
+ <xsl:apply-templates/>
13685
+ </fo:block>
13686
+ </xsl:template>
13687
+ <xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
13688
+ <fo:block>
13689
+ <xsl:apply-templates/>
13690
+ </fo:block>
13691
+ </xsl:template>
13692
+
13662
13693
  <!-- ========== -->
13663
13694
  <!-- definition -->
13664
13695
  <!-- ========== -->
@@ -14564,6 +14595,7 @@
14564
14595
 
14565
14596
  <!-- Normative references -->
14566
14597
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
14598
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14567
14599
 
14568
14600
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14569
14601
 
@@ -15279,7 +15311,8 @@
15279
15311
  <!-- add @id - first element with @id plus '_element_name' -->
15280
15312
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
15281
15313
  <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>
15282
- <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
15314
+ <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
15315
+ <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
15283
15316
  </xsl:if>
15284
15317
  </xsl:template>
15285
15318
 
@@ -15336,6 +15369,31 @@
15336
15369
  <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
15337
15370
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
15338
15371
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
15372
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
15373
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
15374
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
15375
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
15376
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
15377
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
15378
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
15379
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
15380
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
15381
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
15382
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
15383
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
15384
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
15385
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
15386
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
15387
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
15388
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
15389
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
15390
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
15391
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
15392
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
15393
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
15394
+
15395
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
15396
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
15339
15397
 
15340
15398
  <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
15341
15399
  <xsl:copy>
@@ -15368,13 +15426,115 @@
15368
15426
 
15369
15427
  <xsl:template match="*[local-name() = 'fmt-name']"/>
15370
15428
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
15371
- <xsl:element name="name" namespace="{$namespace_full}">
15429
+ <xsl:choose>
15430
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
15431
+ <xsl:apply-templates mode="update_xml_step1"/>
15432
+ </xsl:when>
15433
+ <xsl:otherwise>
15434
+ <xsl:element name="name" namespace="{$namespace_full}">
15435
+ <xsl:copy-of select="@*"/>
15436
+ <xsl:apply-templates mode="update_xml_step1"/>
15437
+ </xsl:element>
15438
+ </xsl:otherwise>
15439
+ </xsl:choose>
15440
+ </xsl:template>
15441
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
15442
+ <xsl:choose>
15443
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
15444
+ <xsl:apply-templates mode="update_xml_step1"/>
15445
+ </xsl:when>
15446
+ <xsl:otherwise>
15447
+ <xsl:element name="name" namespace="{$namespace_full}">
15448
+ <xsl:copy-of select="@*"/>
15449
+ <xsl:apply-templates mode="update_xml_pres"/>
15450
+ </xsl:element>
15451
+ </xsl:otherwise>
15452
+ </xsl:choose>
15453
+ </xsl:template>
15454
+
15455
+ <xsl:template match="*[local-name() = 'fmt-preferred']"/>
15456
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
15457
+ <xsl:apply-templates mode="update_xml_step1"/>
15458
+ </xsl:template>
15459
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
15460
+ <xsl:element name="preferred" namespace="{$namespace_full}">
15372
15461
  <xsl:copy-of select="@*"/>
15373
15462
  <xsl:apply-templates mode="update_xml_step1"/>
15374
15463
  </xsl:element>
15375
15464
  </xsl:template>
15376
- <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
15377
- <xsl:element name="name" namespace="{$namespace_full}">
15465
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
15466
+ <xsl:apply-templates mode="update_xml_pres"/>
15467
+ </xsl:template>
15468
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
15469
+ <xsl:element name="preferred" namespace="{$namespace_full}">
15470
+ <xsl:copy-of select="@*"/>
15471
+ <xsl:apply-templates mode="update_xml_pres"/>
15472
+ </xsl:element>
15473
+ </xsl:template>
15474
+
15475
+ <xsl:template match="*[local-name() = 'fmt-admitted']"/>
15476
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
15477
+ <xsl:apply-templates mode="update_xml_step1"/>
15478
+ </xsl:template>
15479
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
15480
+ <xsl:element name="admitted" namespace="{$namespace_full}">
15481
+ <xsl:copy-of select="@*"/>
15482
+ <xsl:apply-templates mode="update_xml_step1"/>
15483
+ </xsl:element>
15484
+ </xsl:template>
15485
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
15486
+ <xsl:apply-templates mode="update_xml_pres"/>
15487
+ </xsl:template>
15488
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
15489
+ <xsl:element name="admitted" namespace="{$namespace_full}">
15490
+ <xsl:copy-of select="@*"/>
15491
+ <xsl:apply-templates mode="update_xml_pres"/>
15492
+ </xsl:element>
15493
+ </xsl:template>
15494
+
15495
+ <xsl:template match="*[local-name() = 'fmt-deprecates']"/>
15496
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
15497
+ <xsl:apply-templates mode="update_xml_step1"/>
15498
+ </xsl:template>
15499
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
15500
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
15501
+ <xsl:copy-of select="@*"/>
15502
+ <xsl:apply-templates mode="update_xml_step1"/>
15503
+ </xsl:element>
15504
+ </xsl:template>
15505
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
15506
+ <xsl:apply-templates mode="update_xml_pres"/>
15507
+ </xsl:template>
15508
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
15509
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
15510
+ <xsl:copy-of select="@*"/>
15511
+ <xsl:apply-templates mode="update_xml_pres"/>
15512
+ </xsl:element>
15513
+ </xsl:template>
15514
+
15515
+ <xsl:template match="*[local-name() = 'fmt-definition']"/>
15516
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
15517
+ <xsl:element name="definition" namespace="{$namespace_full}">
15518
+ <xsl:copy-of select="@*"/>
15519
+ <xsl:apply-templates mode="update_xml_step1"/>
15520
+ </xsl:element>
15521
+ </xsl:template>
15522
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
15523
+ <xsl:element name="definition" namespace="{$namespace_full}">
15524
+ <xsl:copy-of select="@*"/>
15525
+ <xsl:apply-templates mode="update_xml_pres"/>
15526
+ </xsl:element>
15527
+ </xsl:template>
15528
+
15529
+ <xsl:template match="*[local-name() = 'fmt-termsource']"/>
15530
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
15531
+ <xsl:element name="termsource" namespace="{$namespace_full}">
15532
+ <xsl:copy-of select="@*"/>
15533
+ <xsl:apply-templates mode="update_xml_step1"/>
15534
+ </xsl:element>
15535
+ </xsl:template>
15536
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
15537
+ <xsl:element name="termsource" namespace="{$namespace_full}">
15378
15538
  <xsl:copy-of select="@*"/>
15379
15539
  <xsl:apply-templates mode="update_xml_pres"/>
15380
15540
  </xsl:element>
@@ -15387,6 +15547,9 @@
15387
15547
  <xsl:apply-templates mode="update_xml_pres"/>
15388
15548
  </xsl:template>
15389
15549
 
15550
+ <xsl:template match="*[local-name() = 'semx']">
15551
+ <xsl:apply-templates/>
15552
+ </xsl:template>
15390
15553
  <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
15391
15554
  <xsl:apply-templates mode="update_xml_step1"/>
15392
15555
  </xsl:template>
@@ -16518,7 +16681,7 @@
16518
16681
  </xsl:template>
16519
16682
 
16520
16683
  <xsl:template name="namespaceCheck">
16521
- <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
16684
+ <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
16522
16685
  <xsl:variable name="XSLNS">
16523
16686
 
16524
16687
  <xsl:value-of select="document('')//*/namespace::bipm"/>
@@ -16608,6 +16771,9 @@
16608
16771
  <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
16609
16772
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16610
16773
  </xsl:when>
16774
+ <xsl:when test="string-length($bibdata_updated) != ''">
16775
+ <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16776
+ </xsl:when>
16611
16777
  <xsl:when test="$formatted = 'true'">
16612
16778
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
16613
16779
  </xsl:when>