metanorma-un 0.6.2 → 0.6.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac07ef36025bf48f602b707379d4b10aff6d5acee7e2cb8fb3f22229c123aaeb
4
- data.tar.gz: 15e6019bbc953ff7dcfc98199f006c79b06f222986a0cc86081ab0b2226d9168
3
+ metadata.gz: 4c912b31c8b7553b5f41e0f5d1ae1c34deac58bed45306cd8f025ee142e9dd6c
4
+ data.tar.gz: 887ac41163af19cfded0b17d34afa7b5288e51b525938438d6491502cc710683
5
5
  SHA512:
6
- metadata.gz: cdadfe44c99f83c5f209fa56e1d65e92d1a36368e019eb50273ee0cde17df9276165152e9f470c38af6e18c3fee52e46354fd4589f8e2f37f19edd0c1497eb7d
7
- data.tar.gz: '09730915844ff8c66f922138c6fa4c551f5351313551180a29181690ea73ecdac94b889948bdd30b7d4e31f3ecb79c41fb4174ccd6eb0d35969bbfe1a6fa0462'
6
+ metadata.gz: f77132123fed3742f89446af47bb99500faddf33d66ca8e35e1dcb2341fa378d18cdcf9b4f0fb60846bed6ee32fc3da98904c07f974fa58e2af2a4c071fe5d30
7
+ data.tar.gz: 003dca37c79fb0f48ed5b1330ce146850ffc639aba021710248e2f855686df7bba2084cf41848df704ea2d1ddd7121fef394c78f4b43de79746849e853ea14a2
@@ -787,6 +787,7 @@
787
787
  <value>adapted</value>
788
788
  <value>vote-started</value>
789
789
  <value>vote-ended</value>
790
+ <value>announced</value>
790
791
  </choice>
791
792
  </define>
792
793
  <define name="bdate">
@@ -1191,9 +1191,7 @@
1191
1191
  </define>
1192
1192
  <define name="IsoWorkgroup">
1193
1193
  <optional>
1194
- <attribute name="number">
1195
- <data type="int"/>
1196
- </attribute>
1194
+ <attribute name="number"/>
1197
1195
  </optional>
1198
1196
  <optional>
1199
1197
  <attribute name="type"/>
@@ -1326,6 +1326,9 @@
1326
1326
  <title-continued lang="en">(continued)</title-continued>
1327
1327
  <title-continued lang="fr">(continué)</title-continued>
1328
1328
 
1329
+ </xsl:variable><xsl:variable name="bibdata">
1330
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1331
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1329
1332
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1330
1333
  <xsl:param name="name"/>
1331
1334
  <xsl:param name="lang"/>
@@ -1356,6 +1359,7 @@
1356
1359
 
1357
1360
 
1358
1361
 
1362
+
1359
1363
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1360
1364
  <xsl:attribute name="white-space">pre</xsl:attribute>
1361
1365
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1469,6 +1473,7 @@
1469
1473
 
1470
1474
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1471
1475
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1476
+
1472
1477
 
1473
1478
 
1474
1479
 
@@ -1500,6 +1505,7 @@
1500
1505
 
1501
1506
 
1502
1507
 
1508
+
1503
1509
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1504
1510
 
1505
1511
 
@@ -1511,6 +1517,7 @@
1511
1517
 
1512
1518
 
1513
1519
 
1520
+
1514
1521
 
1515
1522
 
1516
1523
 
@@ -1536,6 +1543,7 @@
1536
1543
 
1537
1544
 
1538
1545
 
1546
+
1539
1547
  <xsl:attribute name="padding-right">4mm</xsl:attribute>
1540
1548
 
1541
1549
 
@@ -1560,11 +1568,13 @@
1560
1568
 
1561
1569
 
1562
1570
 
1571
+
1563
1572
 
1564
1573
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1565
1574
 
1566
1575
 
1567
1576
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1577
+
1568
1578
 
1569
1579
 
1570
1580
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
@@ -1585,6 +1595,7 @@
1585
1595
 
1586
1596
 
1587
1597
 
1598
+
1588
1599
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1589
1600
 
1590
1601
 
@@ -1593,6 +1604,7 @@
1593
1604
 
1594
1605
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1595
1606
 
1607
+
1596
1608
 
1597
1609
 
1598
1610
 
@@ -1621,6 +1633,7 @@
1621
1633
 
1622
1634
 
1623
1635
 
1636
+
1624
1637
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1625
1638
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1626
1639
  <xsl:attribute name="border">2pt solid black</xsl:attribute>
@@ -1632,6 +1645,7 @@
1632
1645
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1633
1646
 
1634
1647
 
1648
+
1635
1649
  <xsl:attribute name="width">100%</xsl:attribute>
1636
1650
  <xsl:attribute name="content-height">100%</xsl:attribute>
1637
1651
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
@@ -1661,6 +1675,7 @@
1661
1675
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1662
1676
 
1663
1677
 
1678
+
1664
1679
  </xsl:attribute-set><xsl:variable name="color-added-text">
1665
1680
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1666
1681
  </xsl:variable><xsl:attribute-set name="add-style">
@@ -1799,6 +1814,7 @@
1799
1814
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1800
1815
 
1801
1816
 
1817
+
1802
1818
 
1803
1819
 
1804
1820
 
@@ -1814,6 +1830,8 @@
1814
1830
 
1815
1831
 
1816
1832
 
1833
+
1834
+
1817
1835
  <xsl:variable name="table_width">
1818
1836
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1819
1837
 
@@ -1836,6 +1854,7 @@
1836
1854
 
1837
1855
 
1838
1856
 
1857
+
1839
1858
 
1840
1859
 
1841
1860
 
@@ -1977,11 +1996,22 @@
1977
1996
  </xsl:choose>
1978
1997
 
1979
1998
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1999
+ <xsl:param name="continued"/>
1980
2000
  <xsl:if test="normalize-space() != ''">
1981
2001
  <fo:block xsl:use-attribute-sets="table-name-style">
1982
2002
 
1983
2003
 
1984
- <xsl:apply-templates/>
2004
+ <xsl:choose>
2005
+ <xsl:when test="$continued = 'true'">
2006
+ <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2007
+
2008
+ </xsl:when>
2009
+ <xsl:otherwise>
2010
+ <xsl:apply-templates/>
2011
+ </xsl:otherwise>
2012
+ </xsl:choose>
2013
+
2014
+
1985
2015
  </fo:block>
1986
2016
  </xsl:if>
1987
2017
  </xsl:template><xsl:template name="calculate-columns-numbers">
@@ -2121,18 +2151,18 @@
2121
2151
  <xsl:apply-templates/>
2122
2152
  </fo:table-header>
2123
2153
  </xsl:template><xsl:template name="table-header-title">
2124
- <xsl:param name="cols-count"/>
2154
+ <xsl:param name="cols-count"/>
2125
2155
  <!-- row for title -->
2126
2156
  <fo:table-row>
2127
2157
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2128
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2158
+
2159
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2160
+ <xsl:with-param name="continued">true</xsl:with-param>
2161
+ </xsl:apply-templates>
2129
2162
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2130
2163
  <xsl:call-template name="fn_name_display"/>
2131
- </xsl:for-each>
2132
- <fo:block text-align="right" font-style="italic">
2133
- <xsl:text> </xsl:text>
2134
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2135
- </fo:block>
2164
+ </xsl:for-each>
2165
+
2136
2166
  </fo:table-cell>
2137
2167
  </fo:table-row>
2138
2168
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2353,6 +2383,7 @@
2353
2383
 
2354
2384
 
2355
2385
 
2386
+
2356
2387
  </xsl:if>
2357
2388
  <xsl:if test="$parent-name = 'tfoot'">
2358
2389
 
@@ -2392,6 +2423,7 @@
2392
2423
 
2393
2424
 
2394
2425
 
2426
+
2395
2427
  <xsl:attribute name="display-align">center</xsl:attribute>
2396
2428
  <xsl:attribute name="font-style">italic</xsl:attribute>
2397
2429
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -3089,6 +3121,7 @@
3089
3121
 
3090
3122
 
3091
3123
 
3124
+
3092
3125
 
3093
3126
  </xsl:variable>
3094
3127
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3470,11 +3503,15 @@
3470
3503
  </xsl:apply-templates>
3471
3504
  </xsl:template><xsl:template name="getLang">
3472
3505
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3506
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3473
3507
  <xsl:variable name="language">
3474
3508
  <xsl:choose>
3475
3509
  <xsl:when test="$language_current != ''">
3476
3510
  <xsl:value-of select="$language_current"/>
3477
3511
  </xsl:when>
3512
+ <xsl:when test="$language_current_2 != ''">
3513
+ <xsl:value-of select="$language_current_2"/>
3514
+ </xsl:when>
3478
3515
  <xsl:otherwise>
3479
3516
  <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3480
3517
  </xsl:otherwise>
@@ -3696,6 +3733,7 @@
3696
3733
 
3697
3734
 
3698
3735
  <fo:inline xsl:use-attribute-sets="note-name-style">
3736
+
3699
3737
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3700
3738
  </fo:inline>
3701
3739
  <xsl:apply-templates/>
@@ -3722,6 +3760,7 @@
3722
3760
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3723
3761
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3724
3762
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3763
+
3725
3764
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3726
3765
  </fo:inline>
3727
3766
  <xsl:apply-templates/>
@@ -3803,7 +3842,10 @@
3803
3842
  <xsl:for-each select="*[local-name() = 'note']">
3804
3843
  <xsl:call-template name="note"/>
3805
3844
  </xsl:for-each>
3806
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3845
+
3846
+
3847
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3848
+
3807
3849
  </fo:block-container>
3808
3850
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3809
3851
  <fo:block id="{@id}">
@@ -3922,15 +3964,15 @@
3922
3964
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
3923
3965
  <xsl:apply-templates mode="bookmarks"/>
3924
3966
  <xsl:text> </xsl:text>
3925
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3967
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
3926
3968
  <xsl:value-of select="."/>
3927
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3969
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3928
3970
  <xsl:value-of select="."/>
3929
3971
  </xsl:template><xsl:template match="node()" mode="contents">
3930
3972
  <xsl:apply-templates mode="contents"/>
3931
3973
  </xsl:template><xsl:template match="node()" mode="bookmarks">
3932
3974
  <xsl:apply-templates mode="bookmarks"/>
3933
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3975
+ </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
3934
3976
  <xsl:apply-templates select="."/>
3935
3977
  </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3936
3978
  <xsl:apply-templates mode="bookmarks"/>
@@ -4129,6 +4171,8 @@
4129
4171
  </fo:list-item-body>
4130
4172
  </fo:list-item>
4131
4173
  </fo:list-block>
4174
+ </xsl:template><xsl:template name="extractSection">
4175
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4132
4176
  </xsl:template><xsl:template name="extractTitle">
4133
4177
  <xsl:choose>
4134
4178
  <xsl:when test="*[local-name() = 'tab']">
@@ -4176,6 +4220,7 @@
4176
4220
 
4177
4221
 
4178
4222
 
4223
+
4179
4224
 
4180
4225
 
4181
4226
 
@@ -4503,7 +4548,7 @@
4503
4548
  </fo:inline>
4504
4549
  </xsl:otherwise>
4505
4550
  </xsl:choose>
4506
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
4551
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4507
4552
  <fo:block xsl:use-attribute-sets="termsource-style">
4508
4553
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4509
4554
  <xsl:variable name="termsource_text">
@@ -4512,13 +4557,15 @@
4512
4557
 
4513
4558
  <xsl:choose>
4514
4559
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4515
- <xsl:apply-templates/>
4560
+ <!-- <xsl:apply-templates /> -->
4561
+ <xsl:copy-of select="$termsource_text"/>
4516
4562
  </xsl:when>
4517
4563
  <xsl:otherwise>
4518
4564
 
4519
4565
  <xsl:text>[</xsl:text>
4520
4566
 
4521
- <xsl:apply-templates/>
4567
+ <!-- <xsl:apply-templates /> -->
4568
+ <xsl:copy-of select="$termsource_text"/>
4522
4569
 
4523
4570
  <xsl:text>]</xsl:text>
4524
4571
 
@@ -4529,8 +4576,15 @@
4529
4576
  <xsl:if test="normalize-space() != ''">
4530
4577
  <xsl:value-of select="."/>
4531
4578
  </xsl:if>
4532
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
4579
+ </xsl:template><xsl:variable name="localized.source">
4580
+ <xsl:call-template name="getLocalizedString">
4581
+ <xsl:with-param name="key">source</xsl:with-param>
4582
+ </xsl:call-template>
4583
+ </xsl:variable><xsl:template match="*[local-name() = 'origin']">
4533
4584
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4585
+ <xsl:if test="normalize-space(@citeas) = ''">
4586
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4587
+ </xsl:if>
4534
4588
 
4535
4589
  <fo:inline xsl:use-attribute-sets="origin-style">
4536
4590
  <xsl:apply-templates/>
@@ -4739,7 +4793,6 @@
4739
4793
  </xsl:if>
4740
4794
 
4741
4795
 
4742
-
4743
4796
  <xsl:apply-templates/>
4744
4797
  </fo:block>
4745
4798
 
@@ -4787,7 +4840,7 @@
4787
4840
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4788
4841
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4789
4842
  <xsl:choose>
4790
- <xsl:when test="parent::*[local-name() = 'note']">
4843
+ <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
4791
4844
  <fo:block-container>
4792
4845
  <xsl:attribute name="margin-left">
4793
4846
  <xsl:choose>
@@ -4797,6 +4850,7 @@
4797
4850
  </xsl:attribute>
4798
4851
 
4799
4852
 
4853
+
4800
4854
  <fo:block-container margin-left="0mm">
4801
4855
  <fo:block>
4802
4856
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4998,6 +5052,10 @@
4998
5052
 
4999
5053
 
5000
5054
 
5055
+
5056
+
5057
+
5058
+
5001
5059
  </xsl:template><xsl:template name="processBibitemDocId">
5002
5060
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5003
5061
  <xsl:choose>
@@ -5383,6 +5441,7 @@
5383
5441
 
5384
5442
 
5385
5443
 
5444
+
5386
5445
  <xsl:value-of select="document('')//*/namespace::un"/>
5387
5446
 
5388
5447
 
@@ -5449,13 +5508,18 @@
5449
5508
  </xsl:call-template>
5450
5509
  </xsl:if>
5451
5510
  </xsl:template><xsl:template name="getLocalizedString">
5452
- <xsl:param name="key"/>
5511
+ <xsl:param name="key"/>
5453
5512
 
5454
5513
  <xsl:variable name="curr_lang">
5455
5514
  <xsl:call-template name="getLang"/>
5456
5515
  </xsl:variable>
5457
5516
 
5517
+ <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
5518
+
5458
5519
  <xsl:choose>
5520
+ <xsl:when test="$data_value != ''">
5521
+ <xsl:value-of select="$data_value"/>
5522
+ </xsl:when>
5459
5523
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5460
5524
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5461
5525
  </xsl:when>
@@ -1326,6 +1326,9 @@
1326
1326
  <title-continued lang="en">(continued)</title-continued>
1327
1327
  <title-continued lang="fr">(continué)</title-continued>
1328
1328
 
1329
+ </xsl:variable><xsl:variable name="bibdata">
1330
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1331
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1329
1332
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1330
1333
  <xsl:param name="name"/>
1331
1334
  <xsl:param name="lang"/>
@@ -1356,6 +1359,7 @@
1356
1359
 
1357
1360
 
1358
1361
 
1362
+
1359
1363
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1360
1364
  <xsl:attribute name="white-space">pre</xsl:attribute>
1361
1365
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1469,6 +1473,7 @@
1469
1473
 
1470
1474
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1471
1475
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1476
+
1472
1477
 
1473
1478
 
1474
1479
 
@@ -1500,6 +1505,7 @@
1500
1505
 
1501
1506
 
1502
1507
 
1508
+
1503
1509
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1504
1510
 
1505
1511
 
@@ -1511,6 +1517,7 @@
1511
1517
 
1512
1518
 
1513
1519
 
1520
+
1514
1521
 
1515
1522
 
1516
1523
 
@@ -1536,6 +1543,7 @@
1536
1543
 
1537
1544
 
1538
1545
 
1546
+
1539
1547
  <xsl:attribute name="padding-right">4mm</xsl:attribute>
1540
1548
 
1541
1549
 
@@ -1560,11 +1568,13 @@
1560
1568
 
1561
1569
 
1562
1570
 
1571
+
1563
1572
 
1564
1573
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1565
1574
 
1566
1575
 
1567
1576
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1577
+
1568
1578
 
1569
1579
 
1570
1580
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
@@ -1585,6 +1595,7 @@
1585
1595
 
1586
1596
 
1587
1597
 
1598
+
1588
1599
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1589
1600
 
1590
1601
 
@@ -1593,6 +1604,7 @@
1593
1604
 
1594
1605
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1595
1606
 
1607
+
1596
1608
 
1597
1609
 
1598
1610
 
@@ -1621,6 +1633,7 @@
1621
1633
 
1622
1634
 
1623
1635
 
1636
+
1624
1637
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1625
1638
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1626
1639
  <xsl:attribute name="border">2pt solid black</xsl:attribute>
@@ -1632,6 +1645,7 @@
1632
1645
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1633
1646
 
1634
1647
 
1648
+
1635
1649
  <xsl:attribute name="width">100%</xsl:attribute>
1636
1650
  <xsl:attribute name="content-height">100%</xsl:attribute>
1637
1651
  <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
@@ -1661,6 +1675,7 @@
1661
1675
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1662
1676
 
1663
1677
 
1678
+
1664
1679
  </xsl:attribute-set><xsl:variable name="color-added-text">
1665
1680
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1666
1681
  </xsl:variable><xsl:attribute-set name="add-style">
@@ -1799,6 +1814,7 @@
1799
1814
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1800
1815
 
1801
1816
 
1817
+
1802
1818
 
1803
1819
 
1804
1820
 
@@ -1814,6 +1830,8 @@
1814
1830
 
1815
1831
 
1816
1832
 
1833
+
1834
+
1817
1835
  <xsl:variable name="table_width">
1818
1836
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1819
1837
 
@@ -1836,6 +1854,7 @@
1836
1854
 
1837
1855
 
1838
1856
 
1857
+
1839
1858
 
1840
1859
 
1841
1860
 
@@ -1977,11 +1996,22 @@
1977
1996
  </xsl:choose>
1978
1997
 
1979
1998
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1999
+ <xsl:param name="continued"/>
1980
2000
  <xsl:if test="normalize-space() != ''">
1981
2001
  <fo:block xsl:use-attribute-sets="table-name-style">
1982
2002
 
1983
2003
 
1984
- <xsl:apply-templates/>
2004
+ <xsl:choose>
2005
+ <xsl:when test="$continued = 'true'">
2006
+ <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
2007
+
2008
+ </xsl:when>
2009
+ <xsl:otherwise>
2010
+ <xsl:apply-templates/>
2011
+ </xsl:otherwise>
2012
+ </xsl:choose>
2013
+
2014
+
1985
2015
  </fo:block>
1986
2016
  </xsl:if>
1987
2017
  </xsl:template><xsl:template name="calculate-columns-numbers">
@@ -2121,18 +2151,18 @@
2121
2151
  <xsl:apply-templates/>
2122
2152
  </fo:table-header>
2123
2153
  </xsl:template><xsl:template name="table-header-title">
2124
- <xsl:param name="cols-count"/>
2154
+ <xsl:param name="cols-count"/>
2125
2155
  <!-- row for title -->
2126
2156
  <fo:table-row>
2127
2157
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
2128
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2158
+
2159
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2160
+ <xsl:with-param name="continued">true</xsl:with-param>
2161
+ </xsl:apply-templates>
2129
2162
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
2130
2163
  <xsl:call-template name="fn_name_display"/>
2131
- </xsl:for-each>
2132
- <fo:block text-align="right" font-style="italic">
2133
- <xsl:text> </xsl:text>
2134
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2135
- </fo:block>
2164
+ </xsl:for-each>
2165
+
2136
2166
  </fo:table-cell>
2137
2167
  </fo:table-row>
2138
2168
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2353,6 +2383,7 @@
2353
2383
 
2354
2384
 
2355
2385
 
2386
+
2356
2387
  </xsl:if>
2357
2388
  <xsl:if test="$parent-name = 'tfoot'">
2358
2389
 
@@ -2392,6 +2423,7 @@
2392
2423
 
2393
2424
 
2394
2425
 
2426
+
2395
2427
  <xsl:attribute name="display-align">center</xsl:attribute>
2396
2428
  <xsl:attribute name="font-style">italic</xsl:attribute>
2397
2429
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -3089,6 +3121,7 @@
3089
3121
 
3090
3122
 
3091
3123
 
3124
+
3092
3125
 
3093
3126
  </xsl:variable>
3094
3127
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3470,11 +3503,15 @@
3470
3503
  </xsl:apply-templates>
3471
3504
  </xsl:template><xsl:template name="getLang">
3472
3505
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3506
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3473
3507
  <xsl:variable name="language">
3474
3508
  <xsl:choose>
3475
3509
  <xsl:when test="$language_current != ''">
3476
3510
  <xsl:value-of select="$language_current"/>
3477
3511
  </xsl:when>
3512
+ <xsl:when test="$language_current_2 != ''">
3513
+ <xsl:value-of select="$language_current_2"/>
3514
+ </xsl:when>
3478
3515
  <xsl:otherwise>
3479
3516
  <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3480
3517
  </xsl:otherwise>
@@ -3696,6 +3733,7 @@
3696
3733
 
3697
3734
 
3698
3735
  <fo:inline xsl:use-attribute-sets="note-name-style">
3736
+
3699
3737
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3700
3738
  </fo:inline>
3701
3739
  <xsl:apply-templates/>
@@ -3722,6 +3760,7 @@
3722
3760
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3723
3761
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3724
3762
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3763
+
3725
3764
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3726
3765
  </fo:inline>
3727
3766
  <xsl:apply-templates/>
@@ -3803,7 +3842,10 @@
3803
3842
  <xsl:for-each select="*[local-name() = 'note']">
3804
3843
  <xsl:call-template name="note"/>
3805
3844
  </xsl:for-each>
3806
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3845
+
3846
+
3847
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3848
+
3807
3849
  </fo:block-container>
3808
3850
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3809
3851
  <fo:block id="{@id}">
@@ -3922,15 +3964,15 @@
3922
3964
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
3923
3965
  <xsl:apply-templates mode="bookmarks"/>
3924
3966
  <xsl:text> </xsl:text>
3925
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3967
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
3926
3968
  <xsl:value-of select="."/>
3927
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3969
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3928
3970
  <xsl:value-of select="."/>
3929
3971
  </xsl:template><xsl:template match="node()" mode="contents">
3930
3972
  <xsl:apply-templates mode="contents"/>
3931
3973
  </xsl:template><xsl:template match="node()" mode="bookmarks">
3932
3974
  <xsl:apply-templates mode="bookmarks"/>
3933
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3975
+ </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
3934
3976
  <xsl:apply-templates select="."/>
3935
3977
  </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3936
3978
  <xsl:apply-templates mode="bookmarks"/>
@@ -4129,6 +4171,8 @@
4129
4171
  </fo:list-item-body>
4130
4172
  </fo:list-item>
4131
4173
  </fo:list-block>
4174
+ </xsl:template><xsl:template name="extractSection">
4175
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4132
4176
  </xsl:template><xsl:template name="extractTitle">
4133
4177
  <xsl:choose>
4134
4178
  <xsl:when test="*[local-name() = 'tab']">
@@ -4176,6 +4220,7 @@
4176
4220
 
4177
4221
 
4178
4222
 
4223
+
4179
4224
 
4180
4225
 
4181
4226
 
@@ -4503,7 +4548,7 @@
4503
4548
  </fo:inline>
4504
4549
  </xsl:otherwise>
4505
4550
  </xsl:choose>
4506
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
4551
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4507
4552
  <fo:block xsl:use-attribute-sets="termsource-style">
4508
4553
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4509
4554
  <xsl:variable name="termsource_text">
@@ -4512,13 +4557,15 @@
4512
4557
 
4513
4558
  <xsl:choose>
4514
4559
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4515
- <xsl:apply-templates/>
4560
+ <!-- <xsl:apply-templates /> -->
4561
+ <xsl:copy-of select="$termsource_text"/>
4516
4562
  </xsl:when>
4517
4563
  <xsl:otherwise>
4518
4564
 
4519
4565
  <xsl:text>[</xsl:text>
4520
4566
 
4521
- <xsl:apply-templates/>
4567
+ <!-- <xsl:apply-templates /> -->
4568
+ <xsl:copy-of select="$termsource_text"/>
4522
4569
 
4523
4570
  <xsl:text>]</xsl:text>
4524
4571
 
@@ -4529,8 +4576,15 @@
4529
4576
  <xsl:if test="normalize-space() != ''">
4530
4577
  <xsl:value-of select="."/>
4531
4578
  </xsl:if>
4532
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
4579
+ </xsl:template><xsl:variable name="localized.source">
4580
+ <xsl:call-template name="getLocalizedString">
4581
+ <xsl:with-param name="key">source</xsl:with-param>
4582
+ </xsl:call-template>
4583
+ </xsl:variable><xsl:template match="*[local-name() = 'origin']">
4533
4584
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4585
+ <xsl:if test="normalize-space(@citeas) = ''">
4586
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4587
+ </xsl:if>
4534
4588
 
4535
4589
  <fo:inline xsl:use-attribute-sets="origin-style">
4536
4590
  <xsl:apply-templates/>
@@ -4739,7 +4793,6 @@
4739
4793
  </xsl:if>
4740
4794
 
4741
4795
 
4742
-
4743
4796
  <xsl:apply-templates/>
4744
4797
  </fo:block>
4745
4798
 
@@ -4787,7 +4840,7 @@
4787
4840
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4788
4841
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4789
4842
  <xsl:choose>
4790
- <xsl:when test="parent::*[local-name() = 'note']">
4843
+ <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
4791
4844
  <fo:block-container>
4792
4845
  <xsl:attribute name="margin-left">
4793
4846
  <xsl:choose>
@@ -4797,6 +4850,7 @@
4797
4850
  </xsl:attribute>
4798
4851
 
4799
4852
 
4853
+
4800
4854
  <fo:block-container margin-left="0mm">
4801
4855
  <fo:block>
4802
4856
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4998,6 +5052,10 @@
4998
5052
 
4999
5053
 
5000
5054
 
5055
+
5056
+
5057
+
5058
+
5001
5059
  </xsl:template><xsl:template name="processBibitemDocId">
5002
5060
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
5003
5061
  <xsl:choose>
@@ -5383,6 +5441,7 @@
5383
5441
 
5384
5442
 
5385
5443
 
5444
+
5386
5445
  <xsl:value-of select="document('')//*/namespace::un"/>
5387
5446
 
5388
5447
 
@@ -5449,13 +5508,18 @@
5449
5508
  </xsl:call-template>
5450
5509
  </xsl:if>
5451
5510
  </xsl:template><xsl:template name="getLocalizedString">
5452
- <xsl:param name="key"/>
5511
+ <xsl:param name="key"/>
5453
5512
 
5454
5513
  <xsl:variable name="curr_lang">
5455
5514
  <xsl:call-template name="getLang"/>
5456
5515
  </xsl:variable>
5457
5516
 
5517
+ <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
5518
+
5458
5519
  <xsl:choose>
5520
+ <xsl:when test="$data_value != ''">
5521
+ <xsl:value-of select="$data_value"/>
5522
+ </xsl:when>
5459
5523
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5460
5524
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5461
5525
  </xsl:when>
@@ -1185,6 +1185,9 @@
1185
1185
  <title-continued lang="en">(continued)</title-continued>
1186
1186
  <title-continued lang="fr">(continué)</title-continued>
1187
1187
 
1188
+ </xsl:variable><xsl:variable name="bibdata">
1189
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
1190
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
1188
1191
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1189
1192
  <xsl:param name="name"/>
1190
1193
  <xsl:param name="lang"/>
@@ -1215,6 +1218,7 @@
1215
1218
 
1216
1219
 
1217
1220
 
1221
+
1218
1222
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1219
1223
  <xsl:attribute name="white-space">pre</xsl:attribute>
1220
1224
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1328,6 +1332,7 @@
1328
1332
 
1329
1333
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1330
1334
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1335
+
1331
1336
 
1332
1337
 
1333
1338
 
@@ -1359,6 +1364,7 @@
1359
1364
 
1360
1365
 
1361
1366
 
1367
+
1362
1368
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1363
1369
 
1364
1370
 
@@ -1368,6 +1374,7 @@
1368
1374
 
1369
1375
 
1370
1376
 
1377
+
1371
1378
 
1372
1379
 
1373
1380
 
@@ -1396,6 +1403,7 @@
1396
1403
 
1397
1404
 
1398
1405
 
1406
+
1399
1407
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1400
1408
 
1401
1409
 
@@ -1420,11 +1428,13 @@
1420
1428
 
1421
1429
 
1422
1430
 
1431
+
1423
1432
 
1424
1433
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1425
1434
 
1426
1435
 
1427
1436
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1437
+
1428
1438
 
1429
1439
 
1430
1440
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
@@ -1445,6 +1455,7 @@
1445
1455
 
1446
1456
 
1447
1457
 
1458
+
1448
1459
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1449
1460
 
1450
1461
 
@@ -1453,6 +1464,7 @@
1453
1464
 
1454
1465
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1455
1466
 
1467
+
1456
1468
 
1457
1469
 
1458
1470
 
@@ -1484,6 +1496,7 @@
1484
1496
 
1485
1497
 
1486
1498
 
1499
+
1487
1500
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1488
1501
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1489
1502
 
@@ -1492,6 +1505,7 @@
1492
1505
 
1493
1506
  </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1494
1507
 
1508
+
1495
1509
  <xsl:attribute name="width">100%</xsl:attribute>
1496
1510
  <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1497
1511
  <xsl:attribute name="scaling">uniform</xsl:attribute>
@@ -1521,6 +1535,7 @@
1521
1535
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1522
1536
 
1523
1537
 
1538
+
1524
1539
  </xsl:attribute-set><xsl:variable name="color-added-text">
1525
1540
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1526
1541
  </xsl:variable><xsl:attribute-set name="add-style">
@@ -1659,6 +1674,7 @@
1659
1674
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1660
1675
 
1661
1676
 
1677
+
1662
1678
 
1663
1679
 
1664
1680
  <xsl:attribute name="space-after">12pt</xsl:attribute>
@@ -1676,6 +1692,8 @@
1676
1692
 
1677
1693
 
1678
1694
 
1695
+
1696
+
1679
1697
  <xsl:variable name="table_width">
1680
1698
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
1681
1699
 
@@ -1698,6 +1716,7 @@
1698
1716
 
1699
1717
 
1700
1718
 
1719
+
1701
1720
 
1702
1721
 
1703
1722
  <xsl:if test="ancestor::*[local-name()='sections']">
@@ -1842,11 +1861,22 @@
1842
1861
  </xsl:choose>
1843
1862
 
1844
1863
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1864
+ <xsl:param name="continued"/>
1845
1865
  <xsl:if test="normalize-space() != ''">
1846
1866
  <fo:block xsl:use-attribute-sets="table-name-style">
1847
1867
 
1848
1868
 
1849
- <xsl:apply-templates/>
1869
+ <xsl:choose>
1870
+ <xsl:when test="$continued = 'true'">
1871
+ <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
1872
+
1873
+ </xsl:when>
1874
+ <xsl:otherwise>
1875
+ <xsl:apply-templates/>
1876
+ </xsl:otherwise>
1877
+ </xsl:choose>
1878
+
1879
+
1850
1880
  </fo:block>
1851
1881
  </xsl:if>
1852
1882
  </xsl:template><xsl:template name="calculate-columns-numbers">
@@ -1986,18 +2016,18 @@
1986
2016
  <xsl:apply-templates/>
1987
2017
  </fo:table-header>
1988
2018
  </xsl:template><xsl:template name="table-header-title">
1989
- <xsl:param name="cols-count"/>
2019
+ <xsl:param name="cols-count"/>
1990
2020
  <!-- row for title -->
1991
2021
  <fo:table-row>
1992
2022
  <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
1993
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
2023
+
2024
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
2025
+ <xsl:with-param name="continued">true</xsl:with-param>
2026
+ </xsl:apply-templates>
1994
2027
  <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1995
2028
  <xsl:call-template name="fn_name_display"/>
1996
- </xsl:for-each>
1997
- <fo:block text-align="right" font-style="italic">
1998
- <xsl:text> </xsl:text>
1999
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
2000
- </fo:block>
2029
+ </xsl:for-each>
2030
+
2001
2031
  </fo:table-cell>
2002
2032
  </fo:table-row>
2003
2033
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -2218,6 +2248,7 @@
2218
2248
 
2219
2249
 
2220
2250
 
2251
+
2221
2252
  </xsl:if>
2222
2253
  <xsl:if test="$parent-name = 'tfoot'">
2223
2254
 
@@ -2251,6 +2282,7 @@
2251
2282
 
2252
2283
 
2253
2284
 
2285
+
2254
2286
 
2255
2287
  <xsl:if test="ancestor::*[local-name()='sections']">
2256
2288
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
@@ -2954,6 +2986,7 @@
2954
2986
 
2955
2987
 
2956
2988
 
2989
+
2957
2990
 
2958
2991
  </xsl:variable>
2959
2992
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3335,11 +3368,15 @@
3335
3368
  </xsl:apply-templates>
3336
3369
  </xsl:template><xsl:template name="getLang">
3337
3370
  <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3371
+ <xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3338
3372
  <xsl:variable name="language">
3339
3373
  <xsl:choose>
3340
3374
  <xsl:when test="$language_current != ''">
3341
3375
  <xsl:value-of select="$language_current"/>
3342
3376
  </xsl:when>
3377
+ <xsl:when test="$language_current_2 != ''">
3378
+ <xsl:value-of select="$language_current_2"/>
3379
+ </xsl:when>
3343
3380
  <xsl:otherwise>
3344
3381
  <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3345
3382
  </xsl:otherwise>
@@ -3565,6 +3602,7 @@
3565
3602
 
3566
3603
 
3567
3604
  <fo:inline xsl:use-attribute-sets="note-name-style">
3605
+
3568
3606
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3569
3607
  </fo:inline>
3570
3608
  <xsl:apply-templates/>
@@ -3591,6 +3629,7 @@
3591
3629
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3592
3630
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3593
3631
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3632
+
3594
3633
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3595
3634
  </fo:inline>
3596
3635
  <xsl:apply-templates/>
@@ -3672,7 +3711,10 @@
3672
3711
  <xsl:for-each select="*[local-name() = 'note']">
3673
3712
  <xsl:call-template name="note"/>
3674
3713
  </xsl:for-each>
3675
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3714
+
3715
+
3716
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3717
+
3676
3718
  </fo:block-container>
3677
3719
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3678
3720
  <fo:block id="{@id}">
@@ -3796,15 +3838,15 @@
3796
3838
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
3797
3839
  <xsl:apply-templates mode="bookmarks"/>
3798
3840
  <xsl:text> </xsl:text>
3799
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3841
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
3800
3842
  <xsl:value-of select="."/>
3801
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3843
+ </xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3802
3844
  <xsl:value-of select="."/>
3803
3845
  </xsl:template><xsl:template match="node()" mode="contents">
3804
3846
  <xsl:apply-templates mode="contents"/>
3805
3847
  </xsl:template><xsl:template match="node()" mode="bookmarks">
3806
3848
  <xsl:apply-templates mode="bookmarks"/>
3807
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3849
+ </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
3808
3850
  <xsl:apply-templates select="."/>
3809
3851
  </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3810
3852
  <xsl:apply-templates mode="bookmarks"/>
@@ -4003,6 +4045,8 @@
4003
4045
  </fo:list-item-body>
4004
4046
  </fo:list-item>
4005
4047
  </fo:list-block>
4048
+ </xsl:template><xsl:template name="extractSection">
4049
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
4006
4050
  </xsl:template><xsl:template name="extractTitle">
4007
4051
  <xsl:choose>
4008
4052
  <xsl:when test="*[local-name() = 'tab']">
@@ -4050,6 +4094,7 @@
4050
4094
 
4051
4095
 
4052
4096
 
4097
+
4053
4098
 
4054
4099
 
4055
4100
 
@@ -4377,7 +4422,7 @@
4377
4422
  </fo:inline>
4378
4423
  </xsl:otherwise>
4379
4424
  </xsl:choose>
4380
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
4425
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
4381
4426
  <fo:block xsl:use-attribute-sets="termsource-style">
4382
4427
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
4383
4428
  <xsl:variable name="termsource_text">
@@ -4386,13 +4431,15 @@
4386
4431
 
4387
4432
  <xsl:choose>
4388
4433
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
4389
- <xsl:apply-templates/>
4434
+ <!-- <xsl:apply-templates /> -->
4435
+ <xsl:copy-of select="$termsource_text"/>
4390
4436
  </xsl:when>
4391
4437
  <xsl:otherwise>
4392
4438
 
4393
4439
  <xsl:text>[</xsl:text>
4394
4440
 
4395
- <xsl:apply-templates/>
4441
+ <!-- <xsl:apply-templates /> -->
4442
+ <xsl:copy-of select="$termsource_text"/>
4396
4443
 
4397
4444
  <xsl:text>]</xsl:text>
4398
4445
 
@@ -4403,8 +4450,15 @@
4403
4450
  <xsl:if test="normalize-space() != ''">
4404
4451
  <xsl:value-of select="."/>
4405
4452
  </xsl:if>
4406
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
4453
+ </xsl:template><xsl:variable name="localized.source">
4454
+ <xsl:call-template name="getLocalizedString">
4455
+ <xsl:with-param name="key">source</xsl:with-param>
4456
+ </xsl:call-template>
4457
+ </xsl:variable><xsl:template match="*[local-name() = 'origin']">
4407
4458
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4459
+ <xsl:if test="normalize-space(@citeas) = ''">
4460
+ <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4461
+ </xsl:if>
4408
4462
 
4409
4463
  <fo:inline xsl:use-attribute-sets="origin-style">
4410
4464
  <xsl:apply-templates/>
@@ -4613,7 +4667,6 @@
4613
4667
  <xsl:attribute name="margin-top">3pt</xsl:attribute>
4614
4668
  </xsl:if>
4615
4669
 
4616
-
4617
4670
  <xsl:apply-templates/>
4618
4671
  </fo:block>
4619
4672
 
@@ -4661,7 +4714,7 @@
4661
4714
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4662
4715
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4663
4716
  <xsl:choose>
4664
- <xsl:when test="parent::*[local-name() = 'note']">
4717
+ <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
4665
4718
  <fo:block-container>
4666
4719
  <xsl:attribute name="margin-left">
4667
4720
  <xsl:choose>
@@ -4671,6 +4724,7 @@
4671
4724
  </xsl:attribute>
4672
4725
 
4673
4726
 
4727
+
4674
4728
  <fo:block-container margin-left="0mm">
4675
4729
  <fo:block>
4676
4730
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -4872,6 +4926,10 @@
4872
4926
 
4873
4927
 
4874
4928
 
4929
+
4930
+
4931
+
4932
+
4875
4933
  </xsl:template><xsl:template name="processBibitemDocId">
4876
4934
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4877
4935
  <xsl:choose>
@@ -5257,6 +5315,7 @@
5257
5315
 
5258
5316
 
5259
5317
 
5318
+
5260
5319
  <xsl:value-of select="document('')//*/namespace::un"/>
5261
5320
 
5262
5321
 
@@ -5323,13 +5382,18 @@
5323
5382
  </xsl:call-template>
5324
5383
  </xsl:if>
5325
5384
  </xsl:template><xsl:template name="getLocalizedString">
5326
- <xsl:param name="key"/>
5385
+ <xsl:param name="key"/>
5327
5386
 
5328
5387
  <xsl:variable name="curr_lang">
5329
5388
  <xsl:call-template name="getLang"/>
5330
5389
  </xsl:variable>
5331
5390
 
5391
+ <xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
5392
+
5332
5393
  <xsl:choose>
5394
+ <xsl:when test="$data_value != ''">
5395
+ <xsl:value-of select="$data_value"/>
5396
+ </xsl:when>
5333
5397
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5334
5398
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5335
5399
  </xsl:when>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.6.2".freeze
3
+ VERSION = "0.6.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-10 00:00:00.000000000 Z
11
+ date: 2021-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639