metanorma-iso 2.9.4 → 2.9.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 04e8a6e12c2d31b25893f7989e56136cffdd5f5b7454c3efc4d2028e65915654
4
- data.tar.gz: 7f33792d10112a1cc967ea5a33e4fbe5d85e75f4044302be995d37774aa83a91
3
+ metadata.gz: 02b8536c8dedc08d06356682d97dc203baa51f10136f1d8f5bd4166418f8ae0c
4
+ data.tar.gz: 46cd7825f277c494a45a626f16b72a7471d4894a6d85bb8fa58f184be73fa030
5
5
  SHA512:
6
- metadata.gz: 109dd7d18991f5fad55c38188719e142046b50ffe5d95e8c90928018081572a7b1db1df7a2cd8f42a3f69747052039a3d1af5eb6783c6867a8d0807b3a9cde24
7
- data.tar.gz: 79e315175efdc57d53e46885cd0d4fd687b3012a84d7d15fd9c9684736814ebc3fff485fc29e7531d4e208bf8c1690d7a5e237da496179afaae47f5e861061cb
6
+ metadata.gz: 040eb6a7c0a9ed836363a87d63bd539093c56eb41d8e0e8770c11f64ecf3bf02ffa46a631b8db1a47877818a937f15fe31459c043ff8ab851dc4e07b3cd615ca
7
+ data.tar.gz: 0436551ec589f985bdf87d0028f68466000582a644ccbc9212427c5ac7e1dbef6e75f7c5fb11b5678f66ba84ffa333d5ca9bdd82dabf3ea5a2586a46d99a668c
@@ -7015,6 +7015,9 @@
7015
7015
 
7016
7016
  </xsl:attribute-set>
7017
7017
 
7018
+ <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
7019
+ </xsl:attribute-set>
7020
+
7018
7021
  <xsl:attribute-set name="definition-style">
7019
7022
 
7020
7023
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -9364,7 +9367,9 @@
9364
9367
  <xsl:with-param name="element">
9365
9368
  <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 -->
9366
9369
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
9370
+
9367
9371
  <xsl:copy-of select="$current_fn_number_text"/>
9372
+
9368
9373
  </fo:inline>
9369
9374
  </fo:basic-link>
9370
9375
  </xsl:with-param>
@@ -9383,8 +9388,7 @@
9383
9388
 
9384
9389
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
9385
9390
 
9386
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9387
-
9391
+ <xsl:variable name="fn_block">
9388
9392
  <xsl:call-template name="refine_fn-body-style"/>
9389
9393
 
9390
9394
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
@@ -9392,9 +9396,15 @@
9392
9396
  <xsl:call-template name="refine_fn-body-num-style"/>
9393
9397
 
9394
9398
  <xsl:value-of select="$current_fn_number_text"/>
9399
+
9395
9400
  </fo:inline>
9396
9401
  <xsl:apply-templates/>
9397
- </fo:block>
9402
+ </xsl:variable>
9403
+
9404
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9405
+ <xsl:copy-of select="$fn_block"/>
9406
+ </fo:block>
9407
+
9398
9408
  </fo:block-container>
9399
9409
  </fo:footnote-body>
9400
9410
  </fo:footnote>
@@ -11264,9 +11274,14 @@
11264
11274
 
11265
11275
  <xsl:variable name="simple-table">
11266
11276
 
11277
+ <xsl:variable name="table_without_semantic_elements">
11278
+ <xsl:apply-templates mode="update_xml_pres"/>
11279
+ </xsl:variable>
11280
+
11267
11281
  <!-- Step 0. replace <br/> to <p>...</p> -->
11268
11282
  <xsl:variable name="table_without_br">
11269
- <xsl:apply-templates mode="table-without-br"/>
11283
+ <!-- <xsl:apply-templates mode="table-without-br"/> -->
11284
+ <xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
11270
11285
  </xsl:variable>
11271
11286
 
11272
11287
  <!-- Step 1. colspan processing -->
@@ -15583,14 +15598,17 @@
15583
15598
  </fo:block>
15584
15599
  </xsl:template>
15585
15600
 
15586
- <xsl:template match="*[local-name() = 'domain']">
15601
+ <!-- <xsl:template match="*[local-name() = 'domain']"> -->
15587
15602
  <!-- https://github.com/metanorma/isodoc/issues/607
15588
15603
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
15589
15604
  <xsl:text> </xsl:text> -->
15590
- <xsl:if test="not(@hidden = 'true')">
15605
+ <!-- <xsl:if test="not(@hidden = 'true')">
15591
15606
  <xsl:apply-templates/>
15592
15607
  </xsl:if>
15593
- </xsl:template>
15608
+ </xsl:template> -->
15609
+
15610
+ <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
15611
+ <xsl:template match="*[local-name() = 'domain']"/>
15594
15612
 
15595
15613
  <xsl:template match="*[local-name() = 'admitted']">
15596
15614
  <fo:block xsl:use-attribute-sets="admitted-style">
@@ -15605,9 +15623,11 @@
15605
15623
  </xsl:template>
15606
15624
 
15607
15625
  <xsl:template name="setStyle_preferred">
15608
- <xsl:if test="*[local-name() = 'strong']">
15609
- <xsl:attribute name="font-weight">normal</xsl:attribute>
15610
- </xsl:if>
15626
+
15627
+ <xsl:if test="*[local-name() = 'strong']">
15628
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
15629
+ </xsl:if>
15630
+
15611
15631
  </xsl:template>
15612
15632
 
15613
15633
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -15617,6 +15637,17 @@
15617
15637
  </xsl:template>
15618
15638
  <!-- End Preferred, admitted, deprecated -->
15619
15639
 
15640
+ <xsl:template match="*[local-name() = 'fmt-related']">
15641
+ <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
15642
+ <xsl:apply-templates/>
15643
+ </fo:block>
15644
+ </xsl:template>
15645
+ <xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
15646
+ <fo:block>
15647
+ <xsl:apply-templates/>
15648
+ </fo:block>
15649
+ </xsl:template>
15650
+
15620
15651
  <!-- ========== -->
15621
15652
  <!-- definition -->
15622
15653
  <!-- ========== -->
@@ -16577,6 +16608,7 @@
16577
16608
 
16578
16609
  <!-- Normative references -->
16579
16610
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
16611
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
16580
16612
 
16581
16613
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16582
16614
 
@@ -17299,7 +17331,8 @@
17299
17331
  <!-- add @id - first element with @id plus '_element_name' -->
17300
17332
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
17301
17333
  <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>
17302
- <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
17334
+ <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
17335
+ <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
17303
17336
  </xsl:if>
17304
17337
  </xsl:template>
17305
17338
 
@@ -17356,6 +17389,31 @@
17356
17389
  <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
17357
17390
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
17358
17391
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
17392
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
17393
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
17394
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
17395
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
17396
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
17397
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
17398
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
17399
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
17400
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
17401
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
17402
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
17403
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
17404
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
17405
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
17406
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
17407
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
17408
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
17409
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
17410
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
17411
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
17412
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
17413
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
17414
+
17415
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
17416
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
17359
17417
 
17360
17418
  <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
17361
17419
  <xsl:copy>
@@ -17388,13 +17446,115 @@
17388
17446
 
17389
17447
  <xsl:template match="*[local-name() = 'fmt-name']"/>
17390
17448
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
17391
- <xsl:element name="name" namespace="{$namespace_full}">
17449
+ <xsl:choose>
17450
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
17451
+ <xsl:apply-templates mode="update_xml_step1"/>
17452
+ </xsl:when>
17453
+ <xsl:otherwise>
17454
+ <xsl:element name="name" namespace="{$namespace_full}">
17455
+ <xsl:copy-of select="@*"/>
17456
+ <xsl:apply-templates mode="update_xml_step1"/>
17457
+ </xsl:element>
17458
+ </xsl:otherwise>
17459
+ </xsl:choose>
17460
+ </xsl:template>
17461
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
17462
+ <xsl:choose>
17463
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
17464
+ <xsl:apply-templates mode="update_xml_step1"/>
17465
+ </xsl:when>
17466
+ <xsl:otherwise>
17467
+ <xsl:element name="name" namespace="{$namespace_full}">
17468
+ <xsl:copy-of select="@*"/>
17469
+ <xsl:apply-templates mode="update_xml_pres"/>
17470
+ </xsl:element>
17471
+ </xsl:otherwise>
17472
+ </xsl:choose>
17473
+ </xsl:template>
17474
+
17475
+ <xsl:template match="*[local-name() = 'fmt-preferred']"/>
17476
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
17477
+ <xsl:apply-templates mode="update_xml_step1"/>
17478
+ </xsl:template>
17479
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
17480
+ <xsl:element name="preferred" namespace="{$namespace_full}">
17392
17481
  <xsl:copy-of select="@*"/>
17393
17482
  <xsl:apply-templates mode="update_xml_step1"/>
17394
17483
  </xsl:element>
17395
17484
  </xsl:template>
17396
- <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
17397
- <xsl:element name="name" namespace="{$namespace_full}">
17485
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
17486
+ <xsl:apply-templates mode="update_xml_pres"/>
17487
+ </xsl:template>
17488
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
17489
+ <xsl:element name="preferred" namespace="{$namespace_full}">
17490
+ <xsl:copy-of select="@*"/>
17491
+ <xsl:apply-templates mode="update_xml_pres"/>
17492
+ </xsl:element>
17493
+ </xsl:template>
17494
+
17495
+ <xsl:template match="*[local-name() = 'fmt-admitted']"/>
17496
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
17497
+ <xsl:apply-templates mode="update_xml_step1"/>
17498
+ </xsl:template>
17499
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
17500
+ <xsl:element name="admitted" namespace="{$namespace_full}">
17501
+ <xsl:copy-of select="@*"/>
17502
+ <xsl:apply-templates mode="update_xml_step1"/>
17503
+ </xsl:element>
17504
+ </xsl:template>
17505
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
17506
+ <xsl:apply-templates mode="update_xml_pres"/>
17507
+ </xsl:template>
17508
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
17509
+ <xsl:element name="admitted" namespace="{$namespace_full}">
17510
+ <xsl:copy-of select="@*"/>
17511
+ <xsl:apply-templates mode="update_xml_pres"/>
17512
+ </xsl:element>
17513
+ </xsl:template>
17514
+
17515
+ <xsl:template match="*[local-name() = 'fmt-deprecates']"/>
17516
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
17517
+ <xsl:apply-templates mode="update_xml_step1"/>
17518
+ </xsl:template>
17519
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
17520
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
17521
+ <xsl:copy-of select="@*"/>
17522
+ <xsl:apply-templates mode="update_xml_step1"/>
17523
+ </xsl:element>
17524
+ </xsl:template>
17525
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
17526
+ <xsl:apply-templates mode="update_xml_pres"/>
17527
+ </xsl:template>
17528
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
17529
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
17530
+ <xsl:copy-of select="@*"/>
17531
+ <xsl:apply-templates mode="update_xml_pres"/>
17532
+ </xsl:element>
17533
+ </xsl:template>
17534
+
17535
+ <xsl:template match="*[local-name() = 'fmt-definition']"/>
17536
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
17537
+ <xsl:element name="definition" namespace="{$namespace_full}">
17538
+ <xsl:copy-of select="@*"/>
17539
+ <xsl:apply-templates mode="update_xml_step1"/>
17540
+ </xsl:element>
17541
+ </xsl:template>
17542
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
17543
+ <xsl:element name="definition" namespace="{$namespace_full}">
17544
+ <xsl:copy-of select="@*"/>
17545
+ <xsl:apply-templates mode="update_xml_pres"/>
17546
+ </xsl:element>
17547
+ </xsl:template>
17548
+
17549
+ <xsl:template match="*[local-name() = 'fmt-termsource']"/>
17550
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
17551
+ <xsl:element name="termsource" namespace="{$namespace_full}">
17552
+ <xsl:copy-of select="@*"/>
17553
+ <xsl:apply-templates mode="update_xml_step1"/>
17554
+ </xsl:element>
17555
+ </xsl:template>
17556
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
17557
+ <xsl:element name="termsource" namespace="{$namespace_full}">
17398
17558
  <xsl:copy-of select="@*"/>
17399
17559
  <xsl:apply-templates mode="update_xml_pres"/>
17400
17560
  </xsl:element>
@@ -17407,6 +17567,9 @@
17407
17567
  <xsl:apply-templates mode="update_xml_pres"/>
17408
17568
  </xsl:template>
17409
17569
 
17570
+ <xsl:template match="*[local-name() = 'semx']">
17571
+ <xsl:apply-templates/>
17572
+ </xsl:template>
17410
17573
  <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
17411
17574
  <xsl:apply-templates mode="update_xml_step1"/>
17412
17575
  </xsl:template>
@@ -18665,7 +18828,7 @@
18665
18828
  </xsl:template>
18666
18829
 
18667
18830
  <xsl:template name="namespaceCheck">
18668
- <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
18831
+ <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
18669
18832
  <xsl:variable name="XSLNS">
18670
18833
 
18671
18834
  <xsl:value-of select="document('')//*/namespace::iso"/>
@@ -18755,6 +18918,9 @@
18755
18918
  <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
18756
18919
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18757
18920
  </xsl:when>
18921
+ <xsl:when test="string-length($bibdata_updated) != ''">
18922
+ <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18923
+ </xsl:when>
18758
18924
  <xsl:when test="$formatted = 'true'">
18759
18925
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18760
18926
  </xsl:when>
@@ -7015,6 +7015,9 @@
7015
7015
 
7016
7016
  </xsl:attribute-set>
7017
7017
 
7018
+ <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
7019
+ </xsl:attribute-set>
7020
+
7018
7021
  <xsl:attribute-set name="definition-style">
7019
7022
 
7020
7023
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -9364,7 +9367,9 @@
9364
9367
  <xsl:with-param name="element">
9365
9368
  <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 -->
9366
9369
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
9370
+
9367
9371
  <xsl:copy-of select="$current_fn_number_text"/>
9372
+
9368
9373
  </fo:inline>
9369
9374
  </fo:basic-link>
9370
9375
  </xsl:with-param>
@@ -9383,8 +9388,7 @@
9383
9388
 
9384
9389
  <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
9385
9390
 
9386
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9387
-
9391
+ <xsl:variable name="fn_block">
9388
9392
  <xsl:call-template name="refine_fn-body-style"/>
9389
9393
 
9390
9394
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
@@ -9392,9 +9396,15 @@
9392
9396
  <xsl:call-template name="refine_fn-body-num-style"/>
9393
9397
 
9394
9398
  <xsl:value-of select="$current_fn_number_text"/>
9399
+
9395
9400
  </fo:inline>
9396
9401
  <xsl:apply-templates/>
9397
- </fo:block>
9402
+ </xsl:variable>
9403
+
9404
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
9405
+ <xsl:copy-of select="$fn_block"/>
9406
+ </fo:block>
9407
+
9398
9408
  </fo:block-container>
9399
9409
  </fo:footnote-body>
9400
9410
  </fo:footnote>
@@ -11264,9 +11274,14 @@
11264
11274
 
11265
11275
  <xsl:variable name="simple-table">
11266
11276
 
11277
+ <xsl:variable name="table_without_semantic_elements">
11278
+ <xsl:apply-templates mode="update_xml_pres"/>
11279
+ </xsl:variable>
11280
+
11267
11281
  <!-- Step 0. replace <br/> to <p>...</p> -->
11268
11282
  <xsl:variable name="table_without_br">
11269
- <xsl:apply-templates mode="table-without-br"/>
11283
+ <!-- <xsl:apply-templates mode="table-without-br"/> -->
11284
+ <xsl:apply-templates select="xalan:nodeset($table_without_semantic_elements)" mode="table-without-br"/>
11270
11285
  </xsl:variable>
11271
11286
 
11272
11287
  <!-- Step 1. colspan processing -->
@@ -15583,14 +15598,17 @@
15583
15598
  </fo:block>
15584
15599
  </xsl:template>
15585
15600
 
15586
- <xsl:template match="*[local-name() = 'domain']">
15601
+ <!-- <xsl:template match="*[local-name() = 'domain']"> -->
15587
15602
  <!-- https://github.com/metanorma/isodoc/issues/607
15588
15603
  <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
15589
15604
  <xsl:text> </xsl:text> -->
15590
- <xsl:if test="not(@hidden = 'true')">
15605
+ <!-- <xsl:if test="not(@hidden = 'true')">
15591
15606
  <xsl:apply-templates/>
15592
15607
  </xsl:if>
15593
- </xsl:template>
15608
+ </xsl:template> -->
15609
+
15610
+ <!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
15611
+ <xsl:template match="*[local-name() = 'domain']"/>
15594
15612
 
15595
15613
  <xsl:template match="*[local-name() = 'admitted']">
15596
15614
  <fo:block xsl:use-attribute-sets="admitted-style">
@@ -15605,9 +15623,11 @@
15605
15623
  </xsl:template>
15606
15624
 
15607
15625
  <xsl:template name="setStyle_preferred">
15608
- <xsl:if test="*[local-name() = 'strong']">
15609
- <xsl:attribute name="font-weight">normal</xsl:attribute>
15610
- </xsl:if>
15626
+
15627
+ <xsl:if test="*[local-name() = 'strong']">
15628
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
15629
+ </xsl:if>
15630
+
15611
15631
  </xsl:template>
15612
15632
 
15613
15633
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -15617,6 +15637,17 @@
15617
15637
  </xsl:template>
15618
15638
  <!-- End Preferred, admitted, deprecated -->
15619
15639
 
15640
+ <xsl:template match="*[local-name() = 'fmt-related']">
15641
+ <fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
15642
+ <xsl:apply-templates/>
15643
+ </fo:block>
15644
+ </xsl:template>
15645
+ <xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
15646
+ <fo:block>
15647
+ <xsl:apply-templates/>
15648
+ </fo:block>
15649
+ </xsl:template>
15650
+
15620
15651
  <!-- ========== -->
15621
15652
  <!-- definition -->
15622
15653
  <!-- ========== -->
@@ -16577,6 +16608,7 @@
16577
16608
 
16578
16609
  <!-- Normative references -->
16579
16610
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
16611
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
16580
16612
 
16581
16613
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
16582
16614
 
@@ -17299,7 +17331,8 @@
17299
17331
  <!-- add @id - first element with @id plus '_element_name' -->
17300
17332
  <xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
17301
17333
  <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>
17302
- <xsl:attribute name="id"><xsl:value-of select="$prefix_id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
17334
+ <xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
17335
+ <xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
17303
17336
  </xsl:if>
17304
17337
  </xsl:template>
17305
17338
 
@@ -17356,6 +17389,31 @@
17356
17389
  <xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
17357
17390
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
17358
17391
  <xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
17392
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
17393
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
17394
+ <!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
17395
+ <xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
17396
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
17397
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
17398
+ <!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
17399
+ <xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
17400
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
17401
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
17402
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
17403
+ <!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
17404
+ <xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
17405
+ <xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
17406
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
17407
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
17408
+ <!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
17409
+ <xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
17410
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
17411
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
17412
+ <!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
17413
+ <xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
17414
+
17415
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
17416
+ <xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
17359
17417
 
17360
17418
  <xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
17361
17419
  <xsl:copy>
@@ -17388,13 +17446,115 @@
17388
17446
 
17389
17447
  <xsl:template match="*[local-name() = 'fmt-name']"/>
17390
17448
  <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
17391
- <xsl:element name="name" namespace="{$namespace_full}">
17449
+ <xsl:choose>
17450
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
17451
+ <xsl:apply-templates mode="update_xml_step1"/>
17452
+ </xsl:when>
17453
+ <xsl:otherwise>
17454
+ <xsl:element name="name" namespace="{$namespace_full}">
17455
+ <xsl:copy-of select="@*"/>
17456
+ <xsl:apply-templates mode="update_xml_step1"/>
17457
+ </xsl:element>
17458
+ </xsl:otherwise>
17459
+ </xsl:choose>
17460
+ </xsl:template>
17461
+ <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
17462
+ <xsl:choose>
17463
+ <xsl:when test="local-name(..) = 'p' and ancestor::*[local-name() = 'table']">
17464
+ <xsl:apply-templates mode="update_xml_step1"/>
17465
+ </xsl:when>
17466
+ <xsl:otherwise>
17467
+ <xsl:element name="name" namespace="{$namespace_full}">
17468
+ <xsl:copy-of select="@*"/>
17469
+ <xsl:apply-templates mode="update_xml_pres"/>
17470
+ </xsl:element>
17471
+ </xsl:otherwise>
17472
+ </xsl:choose>
17473
+ </xsl:template>
17474
+
17475
+ <xsl:template match="*[local-name() = 'fmt-preferred']"/>
17476
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
17477
+ <xsl:apply-templates mode="update_xml_step1"/>
17478
+ </xsl:template>
17479
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
17480
+ <xsl:element name="preferred" namespace="{$namespace_full}">
17392
17481
  <xsl:copy-of select="@*"/>
17393
17482
  <xsl:apply-templates mode="update_xml_step1"/>
17394
17483
  </xsl:element>
17395
17484
  </xsl:template>
17396
- <xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_pres">
17397
- <xsl:element name="name" namespace="{$namespace_full}">
17485
+ <xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
17486
+ <xsl:apply-templates mode="update_xml_pres"/>
17487
+ </xsl:template>
17488
+ <xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
17489
+ <xsl:element name="preferred" namespace="{$namespace_full}">
17490
+ <xsl:copy-of select="@*"/>
17491
+ <xsl:apply-templates mode="update_xml_pres"/>
17492
+ </xsl:element>
17493
+ </xsl:template>
17494
+
17495
+ <xsl:template match="*[local-name() = 'fmt-admitted']"/>
17496
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
17497
+ <xsl:apply-templates mode="update_xml_step1"/>
17498
+ </xsl:template>
17499
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
17500
+ <xsl:element name="admitted" namespace="{$namespace_full}">
17501
+ <xsl:copy-of select="@*"/>
17502
+ <xsl:apply-templates mode="update_xml_step1"/>
17503
+ </xsl:element>
17504
+ </xsl:template>
17505
+ <xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
17506
+ <xsl:apply-templates mode="update_xml_pres"/>
17507
+ </xsl:template>
17508
+ <xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
17509
+ <xsl:element name="admitted" namespace="{$namespace_full}">
17510
+ <xsl:copy-of select="@*"/>
17511
+ <xsl:apply-templates mode="update_xml_pres"/>
17512
+ </xsl:element>
17513
+ </xsl:template>
17514
+
17515
+ <xsl:template match="*[local-name() = 'fmt-deprecates']"/>
17516
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
17517
+ <xsl:apply-templates mode="update_xml_step1"/>
17518
+ </xsl:template>
17519
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
17520
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
17521
+ <xsl:copy-of select="@*"/>
17522
+ <xsl:apply-templates mode="update_xml_step1"/>
17523
+ </xsl:element>
17524
+ </xsl:template>
17525
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
17526
+ <xsl:apply-templates mode="update_xml_pres"/>
17527
+ </xsl:template>
17528
+ <xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
17529
+ <xsl:element name="deprecates" namespace="{$namespace_full}">
17530
+ <xsl:copy-of select="@*"/>
17531
+ <xsl:apply-templates mode="update_xml_pres"/>
17532
+ </xsl:element>
17533
+ </xsl:template>
17534
+
17535
+ <xsl:template match="*[local-name() = 'fmt-definition']"/>
17536
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
17537
+ <xsl:element name="definition" namespace="{$namespace_full}">
17538
+ <xsl:copy-of select="@*"/>
17539
+ <xsl:apply-templates mode="update_xml_step1"/>
17540
+ </xsl:element>
17541
+ </xsl:template>
17542
+ <xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
17543
+ <xsl:element name="definition" namespace="{$namespace_full}">
17544
+ <xsl:copy-of select="@*"/>
17545
+ <xsl:apply-templates mode="update_xml_pres"/>
17546
+ </xsl:element>
17547
+ </xsl:template>
17548
+
17549
+ <xsl:template match="*[local-name() = 'fmt-termsource']"/>
17550
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
17551
+ <xsl:element name="termsource" namespace="{$namespace_full}">
17552
+ <xsl:copy-of select="@*"/>
17553
+ <xsl:apply-templates mode="update_xml_step1"/>
17554
+ </xsl:element>
17555
+ </xsl:template>
17556
+ <xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
17557
+ <xsl:element name="termsource" namespace="{$namespace_full}">
17398
17558
  <xsl:copy-of select="@*"/>
17399
17559
  <xsl:apply-templates mode="update_xml_pres"/>
17400
17560
  </xsl:element>
@@ -17407,6 +17567,9 @@
17407
17567
  <xsl:apply-templates mode="update_xml_pres"/>
17408
17568
  </xsl:template>
17409
17569
 
17570
+ <xsl:template match="*[local-name() = 'semx']">
17571
+ <xsl:apply-templates/>
17572
+ </xsl:template>
17410
17573
  <xsl:template match="*[local-name() = 'semx']" mode="update_xml_step1">
17411
17574
  <xsl:apply-templates mode="update_xml_step1"/>
17412
17575
  </xsl:template>
@@ -18665,7 +18828,7 @@
18665
18828
  </xsl:template>
18666
18829
 
18667
18830
  <xsl:template name="namespaceCheck">
18668
- <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
18831
+ <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
18669
18832
  <xsl:variable name="XSLNS">
18670
18833
 
18671
18834
  <xsl:value-of select="document('')//*/namespace::iso"/>
@@ -18755,6 +18918,9 @@
18755
18918
  <xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
18756
18919
  <xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18757
18920
  </xsl:when>
18921
+ <xsl:when test="string-length($bibdata_updated) != ''">
18922
+ <xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18923
+ </xsl:when>
18758
18924
  <xsl:when test="$formatted = 'true'">
18759
18925
  <xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
18760
18926
  </xsl:when>
@@ -10,6 +10,7 @@ module IsoDoc
10
10
  def concept(docxml)
11
11
  concept_term(docxml)
12
12
  docxml.xpath(ns("//concept")).each do |node|
13
+ node.ancestors("definition, termsource, related").empty? and
13
14
  concept_render(node, ital: "false", ref: "false",
14
15
  linkref: "true", linkmention: "false")
15
16
  end
@@ -19,7 +20,10 @@ module IsoDoc
19
20
  docxml.xpath(ns("//term")).each do |f|
20
21
  m = {}
21
22
  (f.xpath(ns(".//concept")) - f.xpath(ns(".//term//concept")))
22
- .each { |c| concept_term1(c, m) }
23
+ .each do |c|
24
+ c.ancestors("definition, termsource, related").empty? and
25
+ concept_term1(c, m)
26
+ end
23
27
  end
24
28
  end
25
29
 
@@ -1277,17 +1277,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1277
1277
  </define>
1278
1278
  <define name="validityBegins">
1279
1279
  <element name="validityBegins">
1280
- <ref name="ISO8601DateTime"/>
1280
+ <ref name="ISO8601Date"/>
1281
1281
  </element>
1282
1282
  </define>
1283
1283
  <define name="validityEnds">
1284
1284
  <element name="validityEnds">
1285
- <ref name="ISO8601DateTime"/>
1285
+ <ref name="ISO8601Date"/>
1286
1286
  </element>
1287
1287
  </define>
1288
1288
  <define name="validityRevision">
1289
1289
  <element name="revision">
1290
- <ref name="ISO8601DateTime"/>
1290
+ <ref name="ISO8601Date"/>
1291
1291
  </element>
1292
1292
  </define>
1293
1293
  <define name="TypedTitleString">
@@ -42,7 +42,8 @@ module Metanorma
42
42
  end
43
43
 
44
44
  TERM_CLAUSE =
45
- "//sections//terms[not(preceding-sibling::clause)] | " \
45
+ "//sections/terms | " \
46
+ "//sections/clause//terms[not(preceding-sibling::clause)] | " \
46
47
  "//sections//clause[descendant::terms][not(descendant::definitions)][@type = 'terms'] | " \
47
48
  "//sections/clause[not(@type = 'terms')][not(descendant::definitions)]//terms".freeze
48
49
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "2.9.4".freeze
3
+ VERSION = "2.9.6".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.4
4
+ version: 2.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-07 00:00:00.000000000 Z
11
+ date: 2025-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc