metanorma-cc 2.0.3 → 2.0.4

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: ef0fd91d519b9fe14815625ea6ffa60d78f42364526c3be6a7db6df46090d7d2
4
- data.tar.gz: 559c1a98a9b8debdcb5d4e12f5f1e7d4eae6726c44b0161ff6c364e2039b8c35
3
+ metadata.gz: f1b508821074c6707aa0d3c4c54b281ec243ab5edcdb0b8ad10794857ac304fd
4
+ data.tar.gz: dba05758b201ad35a5abfd87178aba2e6a05b7f5a0eb6d871f0e41c22117fa79
5
5
  SHA512:
6
- metadata.gz: 15b5c82d08344592ac04f77cef3a91be1f9addb7c65e5698b29d644fcb1e89b7112438ed429719c8f8fc09fdf958da627f162c794dd33beaabed9194a7dfe101
7
- data.tar.gz: 8f78b869337c0376ab1c6dc7ed4e3697040132892ac63dcebde610a268aaaff57551d749d8ec6f29f6617d84f830344ae50f31e4b3d3f206f81461d30f26932e
6
+ metadata.gz: 83e74bb8d6b7affe2fbcdda9a08c412aa0102002d177224b42078c42faa157dca49a9297af1ac912bb95eedb14df050a72e6bf59f7c766616dd933237ffcd788
7
+ data.tar.gz: 30877425455e9ec93343a2bd5b0b1b9277fffdb5d76a15a52eb6ddc9107da2f7b26f28466f10fd5feea06aad851216ddcdcca33f107ae0af9ec303f89c0b03d1
@@ -530,6 +530,10 @@
530
530
  <xsl:text>Édition </xsl:text>
531
531
  </title-edition>
532
532
 
533
+ <title-edition lang="ru">
534
+ <xsl:text>Издание </xsl:text>
535
+ </title-edition>
536
+
533
537
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
534
538
  <title-toc lang="en">
535
539
 
@@ -558,7 +562,11 @@
558
562
 
559
563
 
560
564
 
561
- </title-part>
565
+ </title-part>
566
+ <title-part lang="ru">
567
+
568
+
569
+ </title-part>
562
570
  <title-part lang="zh">第 # 部分:</title-part>
563
571
 
564
572
  <title-subpart lang="en">Sub-part #</title-subpart>
@@ -574,6 +582,7 @@
574
582
 
575
583
  <title-summary lang="en">Summary</title-summary>
576
584
 
585
+ <title-continued lang="ru">(продолжение)</title-continued>
577
586
  <title-continued lang="en">(continued)</title-continued>
578
587
  <title-continued lang="fr">(continué)</title-continued>
579
588
 
@@ -1308,13 +1317,19 @@
1308
1317
  </xsl:attribute-set><xsl:variable name="color-added-text">
1309
1318
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1310
1319
  </xsl:variable><xsl:attribute-set name="add-style">
1311
- <xsl:attribute name="color">red</xsl:attribute>
1312
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1313
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1314
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1315
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1316
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1317
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1320
+
1321
+ <xsl:attribute name="color">red</xsl:attribute>
1322
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1323
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1324
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1325
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1326
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1327
+
1328
+ </xsl:attribute-set><xsl:variable name="add-style">
1329
+ <add-style xsl:use-attribute-sets="add-style"/>
1330
+ </xsl:variable><xsl:template name="append_add-style">
1331
+ <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
1332
+ </xsl:template><xsl:variable name="color-deleted-text">
1318
1333
  <xsl:text>red</xsl:text>
1319
1334
  </xsl:variable><xsl:attribute-set name="del-style">
1320
1335
  <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
@@ -1727,14 +1742,42 @@
1727
1742
 
1728
1743
 
1729
1744
  </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">
1745
+ <xsl:variable name="nodes_preface_">
1746
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1747
+ <node id="{@id}"/>
1748
+ </xsl:for-each>
1749
+ </xsl:variable>
1750
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
1751
+
1730
1752
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1731
1753
  <xsl:sort select="@displayorder" data-type="number"/>
1754
+
1755
+ <!-- process Section's title -->
1756
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1757
+ <xsl:if test="$preceding-sibling_id != ''">
1758
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1759
+ </xsl:if>
1760
+
1732
1761
  <xsl:apply-templates select="." mode="contents"/>
1733
1762
  </xsl:for-each>
1734
1763
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1735
1764
 
1765
+ <xsl:variable name="nodes_sections_">
1766
+ <xsl:for-each select="/*/*[local-name()='sections']/*">
1767
+ <node id="{@id}"/>
1768
+ </xsl:for-each>
1769
+ </xsl:variable>
1770
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
1771
+
1736
1772
  <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']]">
1737
1773
  <xsl:sort select="@displayorder" data-type="number"/>
1774
+
1775
+ <!-- process Section's title -->
1776
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1777
+ <xsl:if test="$preceding-sibling_id != ''">
1778
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1779
+ </xsl:if>
1780
+
1738
1781
  <xsl:apply-templates select="." mode="contents"/>
1739
1782
  </xsl:for-each>
1740
1783
 
@@ -1873,7 +1916,7 @@
1873
1916
  </xsl:call-template>
1874
1917
  </xsl:if>
1875
1918
  </xsl:variable>
1876
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1919
+ <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
1877
1920
 
1878
1921
 
1879
1922
  <xsl:variable name="margin-side">
@@ -2139,7 +2182,7 @@
2139
2182
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2140
2183
  <!-- 2009 thinspace -->
2141
2184
  <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2142
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
2185
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2143
2186
  </xsl:call-template>
2144
2187
  </xsl:variable>
2145
2188
  <xsl:variable name="max_length">
@@ -3763,6 +3806,9 @@
3763
3806
  </fo:inline>
3764
3807
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3765
3808
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3809
+ <xsl:if test="parent::*[local-name() = 'add']">
3810
+ <xsl:call-template name="append_add-style"/>
3811
+ </xsl:if>
3766
3812
  <xsl:apply-templates/>
3767
3813
  </fo:basic-link>
3768
3814
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3860,6 +3906,13 @@
3860
3906
 
3861
3907
 
3862
3908
 
3909
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
3910
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
3911
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
3912
+ <xsl:call-template name="append_add-style"/>
3913
+ </xsl:if>
3914
+
3915
+
3863
3916
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3864
3917
  <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3865
3918
  <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
@@ -3898,6 +3951,12 @@
3898
3951
 
3899
3952
 
3900
3953
 
3954
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
3955
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
3956
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
3957
+ <xsl:call-template name="append_add-style"/>
3958
+ </xsl:if>
3959
+
3901
3960
  <xsl:apply-templates select="*[local-name() = 'name']"/>
3902
3961
 
3903
3962
  </fo:inline>
@@ -3947,6 +4006,7 @@
3947
4006
  </fo:block>
3948
4007
  </xsl:template><xsl:template match="*[local-name() = 'term']">
3949
4008
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4009
+
3950
4010
 
3951
4011
 
3952
4012
 
@@ -4383,7 +4443,11 @@
4383
4443
  <xsl:value-of select="."/>
4384
4444
  </xsl:template><xsl:template match="node()" mode="contents">
4385
4445
  <xsl:apply-templates mode="contents"/>
4386
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4446
+ </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">
4447
+ <xsl:call-template name="contents_section-title"/>
4448
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
4449
+ <xsl:call-template name="contents_section-title"/>
4450
+ </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">
4387
4451
  <xsl:variable name="level">
4388
4452
  <xsl:call-template name="getLevel">
4389
4453
  <xsl:with-param name="depth" select="@depth"/>
@@ -5702,7 +5766,7 @@
5702
5766
 
5703
5767
 
5704
5768
 
5705
-
5769
+
5706
5770
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
5707
5771
  </fo:list-block>
5708
5772
  <!-- <xsl:for-each select="./iho:note">
@@ -5720,6 +5784,11 @@
5720
5784
 
5721
5785
 
5722
5786
 
5787
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5788
+ <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5789
+ <xsl:call-template name="append_add-style"/>
5790
+ </xsl:if>
5791
+
5723
5792
  <xsl:call-template name="getListItemFormat"/>
5724
5793
  </fo:block>
5725
5794
  </fo:list-item-label>
@@ -6802,53 +6871,153 @@
6802
6871
  <xsl:param name="first"/>
6803
6872
  <xsl:if test="$number != ''">
6804
6873
  <xsl:variable name="words">
6805
- <words>
6806
- <word cardinal="1">One-</word>
6807
- <word ordinal="1">First </word>
6808
- <word cardinal="2">Two-</word>
6809
- <word ordinal="2">Second </word>
6810
- <word cardinal="3">Three-</word>
6811
- <word ordinal="3">Third </word>
6812
- <word cardinal="4">Four-</word>
6813
- <word ordinal="4">Fourth </word>
6814
- <word cardinal="5">Five-</word>
6815
- <word ordinal="5">Fifth </word>
6816
- <word cardinal="6">Six-</word>
6817
- <word ordinal="6">Sixth </word>
6818
- <word cardinal="7">Seven-</word>
6819
- <word ordinal="7">Seventh </word>
6820
- <word cardinal="8">Eight-</word>
6821
- <word ordinal="8">Eighth </word>
6822
- <word cardinal="9">Nine-</word>
6823
- <word ordinal="9">Ninth </word>
6824
- <word ordinal="10">Tenth </word>
6825
- <word ordinal="11">Eleventh </word>
6826
- <word ordinal="12">Twelfth </word>
6827
- <word ordinal="13">Thirteenth </word>
6828
- <word ordinal="14">Fourteenth </word>
6829
- <word ordinal="15">Fifteenth </word>
6830
- <word ordinal="16">Sixteenth </word>
6831
- <word ordinal="17">Seventeenth </word>
6832
- <word ordinal="18">Eighteenth </word>
6833
- <word ordinal="19">Nineteenth </word>
6834
- <word cardinal="20">Twenty-</word>
6835
- <word ordinal="20">Twentieth </word>
6836
- <word cardinal="30">Thirty-</word>
6837
- <word ordinal="30">Thirtieth </word>
6838
- <word cardinal="40">Forty-</word>
6839
- <word ordinal="40">Fortieth </word>
6840
- <word cardinal="50">Fifty-</word>
6841
- <word ordinal="50">Fiftieth </word>
6842
- <word cardinal="60">Sixty-</word>
6843
- <word ordinal="60">Sixtieth </word>
6844
- <word cardinal="70">Seventy-</word>
6845
- <word ordinal="70">Seventieth </word>
6846
- <word cardinal="80">Eighty-</word>
6847
- <word ordinal="80">Eightieth </word>
6848
- <word cardinal="90">Ninety-</word>
6849
- <word ordinal="90">Ninetieth </word>
6850
- <word cardinal="100">Hundred-</word>
6851
- <word ordinal="100">Hundredth </word>
6874
+ <words>
6875
+ <xsl:choose>
6876
+ <xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
6877
+ <word cardinal="1">Une-</word>
6878
+ <word ordinal="1">Première </word>
6879
+ <word cardinal="2">Deux-</word>
6880
+ <word ordinal="2">Seconde </word>
6881
+ <word cardinal="3">Trois-</word>
6882
+ <word ordinal="3">Tierce </word>
6883
+ <word cardinal="4">Quatre-</word>
6884
+ <word ordinal="4">Quatrième </word>
6885
+ <word cardinal="5">Cinq-</word>
6886
+ <word ordinal="5">Cinquième </word>
6887
+ <word cardinal="6">Six-</word>
6888
+ <word ordinal="6">Sixième </word>
6889
+ <word cardinal="7">Sept-</word>
6890
+ <word ordinal="7">Septième </word>
6891
+ <word cardinal="8">Huit-</word>
6892
+ <word ordinal="8">Huitième </word>
6893
+ <word cardinal="9">Neuf-</word>
6894
+ <word ordinal="9">Neuvième </word>
6895
+ <word ordinal="10">Dixième </word>
6896
+ <word ordinal="11">Onzième </word>
6897
+ <word ordinal="12">Douzième </word>
6898
+ <word ordinal="13">Treizième </word>
6899
+ <word ordinal="14">Quatorzième </word>
6900
+ <word ordinal="15">Quinzième </word>
6901
+ <word ordinal="16">Seizième </word>
6902
+ <word ordinal="17">Dix-septième </word>
6903
+ <word ordinal="18">Dix-huitième </word>
6904
+ <word ordinal="19">Dix-neuvième </word>
6905
+ <word cardinal="20">Vingt-</word>
6906
+ <word ordinal="20">Vingtième </word>
6907
+ <word cardinal="30">Trente-</word>
6908
+ <word ordinal="30">Trentième </word>
6909
+ <word cardinal="40">Quarante-</word>
6910
+ <word ordinal="40">Quarantième </word>
6911
+ <word cardinal="50">Cinquante-</word>
6912
+ <word ordinal="50">Cinquantième </word>
6913
+ <word cardinal="60">Soixante-</word>
6914
+ <word ordinal="60">Soixantième </word>
6915
+ <word cardinal="70">Septante-</word>
6916
+ <word ordinal="70">Septantième </word>
6917
+ <word cardinal="80">Huitante-</word>
6918
+ <word ordinal="80">Huitantième </word>
6919
+ <word cardinal="90">Nonante-</word>
6920
+ <word ordinal="90">Nonantième </word>
6921
+ <word cardinal="100">Cent-</word>
6922
+ <word ordinal="100">Centième </word>
6923
+ </xsl:when>
6924
+ <xsl:when test="$lang = 'ru'">
6925
+ <word cardinal="1">Одна-</word>
6926
+ <word ordinal="1">Первое </word>
6927
+ <word cardinal="2">Две-</word>
6928
+ <word ordinal="2">Второе </word>
6929
+ <word cardinal="3">Три-</word>
6930
+ <word ordinal="3">Третье </word>
6931
+ <word cardinal="4">Четыре-</word>
6932
+ <word ordinal="4">Четвертое </word>
6933
+ <word cardinal="5">Пять-</word>
6934
+ <word ordinal="5">Пятое </word>
6935
+ <word cardinal="6">Шесть-</word>
6936
+ <word ordinal="6">Шестое </word>
6937
+ <word cardinal="7">Семь-</word>
6938
+ <word ordinal="7">Седьмое </word>
6939
+ <word cardinal="8">Восемь-</word>
6940
+ <word ordinal="8">Восьмое </word>
6941
+ <word cardinal="9">Девять-</word>
6942
+ <word ordinal="9">Девятое </word>
6943
+ <word ordinal="10">Десятое </word>
6944
+ <word ordinal="11">Одиннадцатое </word>
6945
+ <word ordinal="12">Двенадцатое </word>
6946
+ <word ordinal="13">Тринадцатое </word>
6947
+ <word ordinal="14">Четырнадцатое </word>
6948
+ <word ordinal="15">Пятнадцатое </word>
6949
+ <word ordinal="16">Шестнадцатое </word>
6950
+ <word ordinal="17">Семнадцатое </word>
6951
+ <word ordinal="18">Восемнадцатое </word>
6952
+ <word ordinal="19">Девятнадцатое </word>
6953
+ <word cardinal="20">Двадцать-</word>
6954
+ <word ordinal="20">Двадцатое </word>
6955
+ <word cardinal="30">Тридцать-</word>
6956
+ <word ordinal="30">Тридцатое </word>
6957
+ <word cardinal="40">Сорок-</word>
6958
+ <word ordinal="40">Сороковое </word>
6959
+ <word cardinal="50">Пятьдесят-</word>
6960
+ <word ordinal="50">Пятидесятое </word>
6961
+ <word cardinal="60">Шестьдесят-</word>
6962
+ <word ordinal="60">Шестидесятое </word>
6963
+ <word cardinal="70">Семьдесят-</word>
6964
+ <word ordinal="70">Семидесятое </word>
6965
+ <word cardinal="80">Восемьдесят-</word>
6966
+ <word ordinal="80">Восьмидесятое </word>
6967
+ <word cardinal="90">Девяносто-</word>
6968
+ <word ordinal="90">Девяностое </word>
6969
+ <word cardinal="100">Сто-</word>
6970
+ <word ordinal="100">Сотое </word>
6971
+ </xsl:when>
6972
+ <xsl:otherwise> <!-- default english -->
6973
+ <word cardinal="1">One-</word>
6974
+ <word ordinal="1">First </word>
6975
+ <word cardinal="2">Two-</word>
6976
+ <word ordinal="2">Second </word>
6977
+ <word cardinal="3">Three-</word>
6978
+ <word ordinal="3">Third </word>
6979
+ <word cardinal="4">Four-</word>
6980
+ <word ordinal="4">Fourth </word>
6981
+ <word cardinal="5">Five-</word>
6982
+ <word ordinal="5">Fifth </word>
6983
+ <word cardinal="6">Six-</word>
6984
+ <word ordinal="6">Sixth </word>
6985
+ <word cardinal="7">Seven-</word>
6986
+ <word ordinal="7">Seventh </word>
6987
+ <word cardinal="8">Eight-</word>
6988
+ <word ordinal="8">Eighth </word>
6989
+ <word cardinal="9">Nine-</word>
6990
+ <word ordinal="9">Ninth </word>
6991
+ <word ordinal="10">Tenth </word>
6992
+ <word ordinal="11">Eleventh </word>
6993
+ <word ordinal="12">Twelfth </word>
6994
+ <word ordinal="13">Thirteenth </word>
6995
+ <word ordinal="14">Fourteenth </word>
6996
+ <word ordinal="15">Fifteenth </word>
6997
+ <word ordinal="16">Sixteenth </word>
6998
+ <word ordinal="17">Seventeenth </word>
6999
+ <word ordinal="18">Eighteenth </word>
7000
+ <word ordinal="19">Nineteenth </word>
7001
+ <word cardinal="20">Twenty-</word>
7002
+ <word ordinal="20">Twentieth </word>
7003
+ <word cardinal="30">Thirty-</word>
7004
+ <word ordinal="30">Thirtieth </word>
7005
+ <word cardinal="40">Forty-</word>
7006
+ <word ordinal="40">Fortieth </word>
7007
+ <word cardinal="50">Fifty-</word>
7008
+ <word ordinal="50">Fiftieth </word>
7009
+ <word cardinal="60">Sixty-</word>
7010
+ <word ordinal="60">Sixtieth </word>
7011
+ <word cardinal="70">Seventy-</word>
7012
+ <word ordinal="70">Seventieth </word>
7013
+ <word cardinal="80">Eighty-</word>
7014
+ <word ordinal="80">Eightieth </word>
7015
+ <word cardinal="90">Ninety-</word>
7016
+ <word ordinal="90">Ninetieth </word>
7017
+ <word cardinal="100">Hundred-</word>
7018
+ <word ordinal="100">Hundredth </word>
7019
+ </xsl:otherwise>
7020
+ </xsl:choose>
6852
7021
  </words>
6853
7022
  </xsl:variable>
6854
7023
 
@@ -6922,4 +7091,18 @@
6922
7091
  <xsl:otherwise>_</xsl:otherwise>
6923
7092
  </xsl:choose>
6924
7093
  </xsl:attribute>
7094
+ </xsl:template><xsl:template name="substring-after-last">
7095
+ <xsl:param name="value"/>
7096
+ <xsl:param name="delimiter"/>
7097
+ <xsl:choose>
7098
+ <xsl:when test="contains($value, $delimiter)">
7099
+ <xsl:call-template name="substring-after-last">
7100
+ <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
7101
+ <xsl:with-param name="delimiter" select="$delimiter"/>
7102
+ </xsl:call-template>
7103
+ </xsl:when>
7104
+ <xsl:otherwise>
7105
+ <xsl:value-of select="$value"/>
7106
+ </xsl:otherwise>
7107
+ </xsl:choose>
6925
7108
  </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 CC
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-cc
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