metanorma-csa 2.0.3 → 2.0.4

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: 867b0c76e15390be774b264c2df106dd93f5ef952301269997fd6b5ec99321f6
4
- data.tar.gz: 80279fbd80e0fd8420c10d5fde78b90982a0b7a25e2ea04612ced31697ba3d6a
3
+ metadata.gz: 4938f9ff49a51e7776a53a92b4c333e07c43619fa1159820289ba8414aafe4fd
4
+ data.tar.gz: 4d88c0de0b204b6cb1e5e3af35cc27fc69f23f05ee98b905de4e0f2e01720f6e
5
5
  SHA512:
6
- metadata.gz: 0bf06af035cf7aa86fd887210a32c223d7cbda7d90c68cfc55b3e78ad24e8cbcf18e8c9846e201c2a03b382e265e0ca1cb741b29483b845edae715d435657291
7
- data.tar.gz: cd76ed9d499742e6fd363dbe24d9e15e0d2582bf6bfe2a5dec4dd3fa64a3d3b7a876a156461c234b8b818af7c72be67d264ac79d09d5a041af708a4f9b157ec6
6
+ metadata.gz: dc59b516a63ec9800fa0b3d037c061f6141cda591d43983e4ceef645195cae8d62874df3d1c2da87ac555e8a96559189ad8c739c4e27b7dfef972dacde6f39e0
7
+ data.tar.gz: 58594ff341c9f989f0c501360ece53f765b19d65d2374d60db216acf01de8367dbc4a49cfa65ea159a8e9559e1ca5d2ef42d58af233b4e0734ebbb3029f20bfe
@@ -523,6 +523,10 @@
523
523
  <xsl:text>Édition </xsl:text>
524
524
  </title-edition>
525
525
 
526
+ <title-edition lang="ru">
527
+ <xsl:text>Издание </xsl:text>
528
+ </title-edition>
529
+
526
530
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
527
531
  <title-toc lang="en">
528
532
 
@@ -551,7 +555,11 @@
551
555
 
552
556
 
553
557
 
554
- </title-part>
558
+ </title-part>
559
+ <title-part lang="ru">
560
+
561
+
562
+ </title-part>
555
563
  <title-part lang="zh">第 # 部分:</title-part>
556
564
 
557
565
  <title-subpart lang="en">Sub-part #</title-subpart>
@@ -567,6 +575,7 @@
567
575
 
568
576
  <title-summary lang="en">Summary</title-summary>
569
577
 
578
+ <title-continued lang="ru">(продолжение)</title-continued>
570
579
  <title-continued lang="en">(continued)</title-continued>
571
580
  <title-continued lang="fr">(continué)</title-continued>
572
581
 
@@ -1299,13 +1308,19 @@
1299
1308
  </xsl:attribute-set><xsl:variable name="color-added-text">
1300
1309
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1301
1310
  </xsl:variable><xsl:attribute-set name="add-style">
1302
- <xsl:attribute name="color">red</xsl:attribute>
1303
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1304
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1305
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1306
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1307
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1308
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1311
+
1312
+ <xsl:attribute name="color">red</xsl:attribute>
1313
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1314
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1315
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1316
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1317
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1318
+
1319
+ </xsl:attribute-set><xsl:variable name="add-style">
1320
+ <add-style xsl:use-attribute-sets="add-style"/>
1321
+ </xsl:variable><xsl:template name="append_add-style">
1322
+ <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
1323
+ </xsl:template><xsl:variable name="color-deleted-text">
1309
1324
  <xsl:text>red</xsl:text>
1310
1325
  </xsl:variable><xsl:attribute-set name="del-style">
1311
1326
  <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
@@ -1746,14 +1761,42 @@
1746
1761
 
1747
1762
 
1748
1763
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1764
+ <xsl:variable name="nodes_preface_">
1765
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1766
+ <node id="{@id}"/>
1767
+ </xsl:for-each>
1768
+ </xsl:variable>
1769
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
1770
+
1749
1771
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1750
1772
  <xsl:sort select="@displayorder" data-type="number"/>
1773
+
1774
+ <!-- process Section's title -->
1775
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1776
+ <xsl:if test="$preceding-sibling_id != ''">
1777
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1778
+ </xsl:if>
1779
+
1751
1780
  <xsl:apply-templates select="." mode="contents"/>
1752
1781
  </xsl:for-each>
1753
1782
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1754
1783
 
1784
+ <xsl:variable name="nodes_sections_">
1785
+ <xsl:for-each select="/*/*[local-name()='sections']/*">
1786
+ <node id="{@id}"/>
1787
+ </xsl:for-each>
1788
+ </xsl:variable>
1789
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
1790
+
1755
1791
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
1756
1792
  <xsl:sort select="@displayorder" data-type="number"/>
1793
+
1794
+ <!-- process Section's title -->
1795
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1796
+ <xsl:if test="$preceding-sibling_id != ''">
1797
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1798
+ </xsl:if>
1799
+
1757
1800
  <xsl:apply-templates select="." mode="contents"/>
1758
1801
  </xsl:for-each>
1759
1802
 
@@ -1890,7 +1933,7 @@
1890
1933
  </xsl:call-template>
1891
1934
  </xsl:if>
1892
1935
  </xsl:variable>
1893
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1936
+ <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
1894
1937
 
1895
1938
 
1896
1939
  <xsl:variable name="margin-side">
@@ -2156,7 +2199,7 @@
2156
2199
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2157
2200
  <!-- 2009 thinspace -->
2158
2201
  <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2159
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
2202
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2160
2203
  </xsl:call-template>
2161
2204
  </xsl:variable>
2162
2205
  <xsl:variable name="max_length">
@@ -3780,6 +3823,9 @@
3780
3823
  </fo:inline>
3781
3824
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3782
3825
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3826
+ <xsl:if test="parent::*[local-name() = 'add']">
3827
+ <xsl:call-template name="append_add-style"/>
3828
+ </xsl:if>
3783
3829
  <xsl:apply-templates/>
3784
3830
  </fo:basic-link>
3785
3831
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3881,6 +3927,13 @@
3881
3927
 
3882
3928
 
3883
3929
 
3930
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
3931
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
3932
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
3933
+ <xsl:call-template name="append_add-style"/>
3934
+ </xsl:if>
3935
+
3936
+
3884
3937
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3885
3938
  <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3886
3939
  <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
@@ -3919,6 +3972,12 @@
3919
3972
 
3920
3973
 
3921
3974
 
3975
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
3976
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
3977
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
3978
+ <xsl:call-template name="append_add-style"/>
3979
+ </xsl:if>
3980
+
3922
3981
  <xsl:apply-templates select="*[local-name() = 'name']"/>
3923
3982
 
3924
3983
  </fo:inline>
@@ -3968,6 +4027,7 @@
3968
4027
  </fo:block>
3969
4028
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3970
4029
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4030
+
3971
4031
 
3972
4032
 
3973
4033
 
@@ -4404,7 +4464,11 @@
4404
4464
  <xsl:value-of select="."/>
4405
4465
  </xsl:template><xsl:template match="node()" mode="contents">
4406
4466
  <xsl:apply-templates mode="contents"/>
4407
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4467
+ </xsl:template><xsl:template match="*[local-name() = 'preface' or local-name() = 'sections']/*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'section-title' and not(@displayorder)]" mode="contents_no_displayorder">
4468
+ <xsl:call-template name="contents_section-title"/>
4469
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
4470
+ <xsl:call-template name="contents_section-title"/>
4471
+ </xsl:template><xsl:template match="*[local-name() = 'clause']/*[local-name() = 'p'][@type = 'section-title' and (@depth != ../*[local-name() = 'title']/@depth or ../*[local-name() = 'title']/@depth = 1)]" priority="3" mode="contents"/><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" name="contents_section-title" mode="contents">
4408
4472
  <xsl:variable name="level">
4409
4473
  <xsl:call-template name="getLevel">
4410
4474
  <xsl:with-param name="depth" select="@depth"/>
@@ -5712,7 +5776,7 @@
5712
5776
 
5713
5777
 
5714
5778
 
5715
-
5779
+
5716
5780
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
5717
5781
  </fo:list-block>
5718
5782
  <!-- <xsl:for-each select="./iho:note">
@@ -5730,6 +5794,11 @@
5730
5794
 
5731
5795
 
5732
5796
 
5797
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5798
+ <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5799
+ <xsl:call-template name="append_add-style"/>
5800
+ </xsl:if>
5801
+
5733
5802
  <xsl:call-template name="getListItemFormat"/>
5734
5803
  </fo:block>
5735
5804
  </fo:list-item-label>
@@ -6860,53 +6929,153 @@
6860
6929
  <xsl:param name="first"/>
6861
6930
  <xsl:if test="$number != ''">
6862
6931
  <xsl:variable name="words">
6863
- <words>
6864
- <word cardinal="1">One-</word>
6865
- <word ordinal="1">First </word>
6866
- <word cardinal="2">Two-</word>
6867
- <word ordinal="2">Second </word>
6868
- <word cardinal="3">Three-</word>
6869
- <word ordinal="3">Third </word>
6870
- <word cardinal="4">Four-</word>
6871
- <word ordinal="4">Fourth </word>
6872
- <word cardinal="5">Five-</word>
6873
- <word ordinal="5">Fifth </word>
6874
- <word cardinal="6">Six-</word>
6875
- <word ordinal="6">Sixth </word>
6876
- <word cardinal="7">Seven-</word>
6877
- <word ordinal="7">Seventh </word>
6878
- <word cardinal="8">Eight-</word>
6879
- <word ordinal="8">Eighth </word>
6880
- <word cardinal="9">Nine-</word>
6881
- <word ordinal="9">Ninth </word>
6882
- <word ordinal="10">Tenth </word>
6883
- <word ordinal="11">Eleventh </word>
6884
- <word ordinal="12">Twelfth </word>
6885
- <word ordinal="13">Thirteenth </word>
6886
- <word ordinal="14">Fourteenth </word>
6887
- <word ordinal="15">Fifteenth </word>
6888
- <word ordinal="16">Sixteenth </word>
6889
- <word ordinal="17">Seventeenth </word>
6890
- <word ordinal="18">Eighteenth </word>
6891
- <word ordinal="19">Nineteenth </word>
6892
- <word cardinal="20">Twenty-</word>
6893
- <word ordinal="20">Twentieth </word>
6894
- <word cardinal="30">Thirty-</word>
6895
- <word ordinal="30">Thirtieth </word>
6896
- <word cardinal="40">Forty-</word>
6897
- <word ordinal="40">Fortieth </word>
6898
- <word cardinal="50">Fifty-</word>
6899
- <word ordinal="50">Fiftieth </word>
6900
- <word cardinal="60">Sixty-</word>
6901
- <word ordinal="60">Sixtieth </word>
6902
- <word cardinal="70">Seventy-</word>
6903
- <word ordinal="70">Seventieth </word>
6904
- <word cardinal="80">Eighty-</word>
6905
- <word ordinal="80">Eightieth </word>
6906
- <word cardinal="90">Ninety-</word>
6907
- <word ordinal="90">Ninetieth </word>
6908
- <word cardinal="100">Hundred-</word>
6909
- <word ordinal="100">Hundredth </word>
6932
+ <words>
6933
+ <xsl:choose>
6934
+ <xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
6935
+ <word cardinal="1">Une-</word>
6936
+ <word ordinal="1">Première </word>
6937
+ <word cardinal="2">Deux-</word>
6938
+ <word ordinal="2">Seconde </word>
6939
+ <word cardinal="3">Trois-</word>
6940
+ <word ordinal="3">Tierce </word>
6941
+ <word cardinal="4">Quatre-</word>
6942
+ <word ordinal="4">Quatrième </word>
6943
+ <word cardinal="5">Cinq-</word>
6944
+ <word ordinal="5">Cinquième </word>
6945
+ <word cardinal="6">Six-</word>
6946
+ <word ordinal="6">Sixième </word>
6947
+ <word cardinal="7">Sept-</word>
6948
+ <word ordinal="7">Septième </word>
6949
+ <word cardinal="8">Huit-</word>
6950
+ <word ordinal="8">Huitième </word>
6951
+ <word cardinal="9">Neuf-</word>
6952
+ <word ordinal="9">Neuvième </word>
6953
+ <word ordinal="10">Dixième </word>
6954
+ <word ordinal="11">Onzième </word>
6955
+ <word ordinal="12">Douzième </word>
6956
+ <word ordinal="13">Treizième </word>
6957
+ <word ordinal="14">Quatorzième </word>
6958
+ <word ordinal="15">Quinzième </word>
6959
+ <word ordinal="16">Seizième </word>
6960
+ <word ordinal="17">Dix-septième </word>
6961
+ <word ordinal="18">Dix-huitième </word>
6962
+ <word ordinal="19">Dix-neuvième </word>
6963
+ <word cardinal="20">Vingt-</word>
6964
+ <word ordinal="20">Vingtième </word>
6965
+ <word cardinal="30">Trente-</word>
6966
+ <word ordinal="30">Trentième </word>
6967
+ <word cardinal="40">Quarante-</word>
6968
+ <word ordinal="40">Quarantième </word>
6969
+ <word cardinal="50">Cinquante-</word>
6970
+ <word ordinal="50">Cinquantième </word>
6971
+ <word cardinal="60">Soixante-</word>
6972
+ <word ordinal="60">Soixantième </word>
6973
+ <word cardinal="70">Septante-</word>
6974
+ <word ordinal="70">Septantième </word>
6975
+ <word cardinal="80">Huitante-</word>
6976
+ <word ordinal="80">Huitantième </word>
6977
+ <word cardinal="90">Nonante-</word>
6978
+ <word ordinal="90">Nonantième </word>
6979
+ <word cardinal="100">Cent-</word>
6980
+ <word ordinal="100">Centième </word>
6981
+ </xsl:when>
6982
+ <xsl:when test="$lang = 'ru'">
6983
+ <word cardinal="1">Одна-</word>
6984
+ <word ordinal="1">Первое </word>
6985
+ <word cardinal="2">Две-</word>
6986
+ <word ordinal="2">Второе </word>
6987
+ <word cardinal="3">Три-</word>
6988
+ <word ordinal="3">Третье </word>
6989
+ <word cardinal="4">Четыре-</word>
6990
+ <word ordinal="4">Четвертое </word>
6991
+ <word cardinal="5">Пять-</word>
6992
+ <word ordinal="5">Пятое </word>
6993
+ <word cardinal="6">Шесть-</word>
6994
+ <word ordinal="6">Шестое </word>
6995
+ <word cardinal="7">Семь-</word>
6996
+ <word ordinal="7">Седьмое </word>
6997
+ <word cardinal="8">Восемь-</word>
6998
+ <word ordinal="8">Восьмое </word>
6999
+ <word cardinal="9">Девять-</word>
7000
+ <word ordinal="9">Девятое </word>
7001
+ <word ordinal="10">Десятое </word>
7002
+ <word ordinal="11">Одиннадцатое </word>
7003
+ <word ordinal="12">Двенадцатое </word>
7004
+ <word ordinal="13">Тринадцатое </word>
7005
+ <word ordinal="14">Четырнадцатое </word>
7006
+ <word ordinal="15">Пятнадцатое </word>
7007
+ <word ordinal="16">Шестнадцатое </word>
7008
+ <word ordinal="17">Семнадцатое </word>
7009
+ <word ordinal="18">Восемнадцатое </word>
7010
+ <word ordinal="19">Девятнадцатое </word>
7011
+ <word cardinal="20">Двадцать-</word>
7012
+ <word ordinal="20">Двадцатое </word>
7013
+ <word cardinal="30">Тридцать-</word>
7014
+ <word ordinal="30">Тридцатое </word>
7015
+ <word cardinal="40">Сорок-</word>
7016
+ <word ordinal="40">Сороковое </word>
7017
+ <word cardinal="50">Пятьдесят-</word>
7018
+ <word ordinal="50">Пятидесятое </word>
7019
+ <word cardinal="60">Шестьдесят-</word>
7020
+ <word ordinal="60">Шестидесятое </word>
7021
+ <word cardinal="70">Семьдесят-</word>
7022
+ <word ordinal="70">Семидесятое </word>
7023
+ <word cardinal="80">Восемьдесят-</word>
7024
+ <word ordinal="80">Восьмидесятое </word>
7025
+ <word cardinal="90">Девяносто-</word>
7026
+ <word ordinal="90">Девяностое </word>
7027
+ <word cardinal="100">Сто-</word>
7028
+ <word ordinal="100">Сотое </word>
7029
+ </xsl:when>
7030
+ <xsl:otherwise> <!-- default english -->
7031
+ <word cardinal="1">One-</word>
7032
+ <word ordinal="1">First </word>
7033
+ <word cardinal="2">Two-</word>
7034
+ <word ordinal="2">Second </word>
7035
+ <word cardinal="3">Three-</word>
7036
+ <word ordinal="3">Third </word>
7037
+ <word cardinal="4">Four-</word>
7038
+ <word ordinal="4">Fourth </word>
7039
+ <word cardinal="5">Five-</word>
7040
+ <word ordinal="5">Fifth </word>
7041
+ <word cardinal="6">Six-</word>
7042
+ <word ordinal="6">Sixth </word>
7043
+ <word cardinal="7">Seven-</word>
7044
+ <word ordinal="7">Seventh </word>
7045
+ <word cardinal="8">Eight-</word>
7046
+ <word ordinal="8">Eighth </word>
7047
+ <word cardinal="9">Nine-</word>
7048
+ <word ordinal="9">Ninth </word>
7049
+ <word ordinal="10">Tenth </word>
7050
+ <word ordinal="11">Eleventh </word>
7051
+ <word ordinal="12">Twelfth </word>
7052
+ <word ordinal="13">Thirteenth </word>
7053
+ <word ordinal="14">Fourteenth </word>
7054
+ <word ordinal="15">Fifteenth </word>
7055
+ <word ordinal="16">Sixteenth </word>
7056
+ <word ordinal="17">Seventeenth </word>
7057
+ <word ordinal="18">Eighteenth </word>
7058
+ <word ordinal="19">Nineteenth </word>
7059
+ <word cardinal="20">Twenty-</word>
7060
+ <word ordinal="20">Twentieth </word>
7061
+ <word cardinal="30">Thirty-</word>
7062
+ <word ordinal="30">Thirtieth </word>
7063
+ <word cardinal="40">Forty-</word>
7064
+ <word ordinal="40">Fortieth </word>
7065
+ <word cardinal="50">Fifty-</word>
7066
+ <word ordinal="50">Fiftieth </word>
7067
+ <word cardinal="60">Sixty-</word>
7068
+ <word ordinal="60">Sixtieth </word>
7069
+ <word cardinal="70">Seventy-</word>
7070
+ <word ordinal="70">Seventieth </word>
7071
+ <word cardinal="80">Eighty-</word>
7072
+ <word ordinal="80">Eightieth </word>
7073
+ <word cardinal="90">Ninety-</word>
7074
+ <word ordinal="90">Ninetieth </word>
7075
+ <word cardinal="100">Hundred-</word>
7076
+ <word ordinal="100">Hundredth </word>
7077
+ </xsl:otherwise>
7078
+ </xsl:choose>
6910
7079
  </words>
6911
7080
  </xsl:variable>
6912
7081
 
@@ -6980,4 +7149,18 @@
6980
7149
  <xsl:otherwise>_</xsl:otherwise>
6981
7150
  </xsl:choose>
6982
7151
  </xsl:attribute>
7152
+ </xsl:template><xsl:template name="substring-after-last">
7153
+ <xsl:param name="value"/>
7154
+ <xsl:param name="delimiter"/>
7155
+ <xsl:choose>
7156
+ <xsl:when test="contains($value, $delimiter)">
7157
+ <xsl:call-template name="substring-after-last">
7158
+ <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
7159
+ <xsl:with-param name="delimiter" select="$delimiter"/>
7160
+ </xsl:call-template>
7161
+ </xsl:when>
7162
+ <xsl:otherwise>
7163
+ <xsl:value-of select="$value"/>
7164
+ </xsl:otherwise>
7165
+ </xsl:choose>
6983
7166
  </xsl:template></xsl:stylesheet>
@@ -152,9 +152,7 @@
152
152
  <data type="boolean"/>
153
153
  </attribute>
154
154
  </optional>
155
- <oneOrMore>
156
- <ref name="PureTextElement"/>
157
- </oneOrMore>
155
+ <ref name="XrefBody"/>
158
156
  </element>
159
157
  </define>
160
158
  <define name="erefType">
@@ -188,6 +186,42 @@
188
186
  <ref name="PureTextElement"/>
189
187
  </oneOrMore>
190
188
  </define>
189
+ <define name="localityStack">
190
+ <element name="localityStack">
191
+ <optional>
192
+ <attribute name="connective">
193
+ <choice>
194
+ <value>and</value>
195
+ <value>or</value>
196
+ <value>from</value>
197
+ <value>to</value>
198
+ <value/>
199
+ </choice>
200
+ </attribute>
201
+ </optional>
202
+ <zeroOrMore>
203
+ <ref name="locality"/>
204
+ </zeroOrMore>
205
+ </element>
206
+ </define>
207
+ <define name="sourceLocalityStack">
208
+ <element name="sourceLocalityStack">
209
+ <optional>
210
+ <attribute name="connective">
211
+ <choice>
212
+ <value>and</value>
213
+ <value>or</value>
214
+ <value>from</value>
215
+ <value>to</value>
216
+ <value/>
217
+ </choice>
218
+ </attribute>
219
+ </optional>
220
+ <zeroOrMore>
221
+ <ref name="sourceLocality"/>
222
+ </zeroOrMore>
223
+ </element>
224
+ </define>
191
225
  <define name="ul">
192
226
  <element name="ul">
193
227
  <attribute name="id">
@@ -1098,6 +1132,16 @@
1098
1132
  </define>
1099
1133
  </include>
1100
1134
  <!-- end overrides -->
1135
+ <define name="image" combine="choice">
1136
+ <element name="svg">
1137
+ <oneOrMore>
1138
+ <choice>
1139
+ <text/>
1140
+ <ref name="AnyElement"/>
1141
+ </choice>
1142
+ </oneOrMore>
1143
+ </element>
1144
+ </define>
1101
1145
  <define name="MultilingualRenderingType">
1102
1146
  <choice>
1103
1147
  <value>common</value>
@@ -2631,4 +2675,30 @@
2631
2675
  </zeroOrMore>
2632
2676
  </element>
2633
2677
  </define>
2678
+ <define name="XrefBody">
2679
+ <zeroOrMore>
2680
+ <ref name="XrefTarget"/>
2681
+ </zeroOrMore>
2682
+ <oneOrMore>
2683
+ <ref name="PureTextElement"/>
2684
+ </oneOrMore>
2685
+ </define>
2686
+ <define name="XrefTarget">
2687
+ <element name="location">
2688
+ <attribute name="target">
2689
+ <data type="string">
2690
+ <param name="pattern">\i\c*|\c+#\c+</param>
2691
+ </data>
2692
+ </attribute>
2693
+ <attribute name="connective">
2694
+ <choice>
2695
+ <value>and</value>
2696
+ <value>or</value>
2697
+ <value>from</value>
2698
+ <value>to</value>
2699
+ <value/>
2700
+ </choice>
2701
+ </attribute>
2702
+ </element>
2703
+ </define>
2634
2704
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "2.0.3".freeze
3
+ VERSION = "2.0.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-07 00:00:00.000000000 Z
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic