metanorma-m3aawg 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: 4f127e98f685011f8b56d8d295e15a5e81d83ac697262558b1ab19eeda30685b
4
- data.tar.gz: c92243391d79830284f0ad9597c3328afc9d4e43e6879f9a4be719b457017a6f
3
+ metadata.gz: c88bcfdac29484c5560c38a5070dc606de65643abee7cd70660e27c53530f358
4
+ data.tar.gz: 60ac790575cf3559e1f69ffced9321da7e8c4493dddca4704a1539c5ddb86795
5
5
  SHA512:
6
- metadata.gz: f9db2e8cebbb4d57f3047972cd0f5d1d26fdd4b44f838f8a21f3d8f3600c89acf61d3719bd5ca1a8b069caf5e6dda888b6629bd47c7e56882fef10f90ef016e5
7
- data.tar.gz: 00d2ef74110ec8dcef97e96a6a7340e0e556ef3dbf81bb5c1b3d88b8c5dd22ee8d77e86dbe57243c8ef8a451a0aa9aa8d56ebcf0863bc2bb3b963caad7bc6086
6
+ metadata.gz: aa32bd82aaf1dd2065aa7c6b5285846a8f179e203cd643204208dd342d5f5c0e4ba4d7febb2fc698728f0db91d4bcd0d002e54b601cccc809196512568f03da4
7
+ data.tar.gz: 56cb129828191709afb6574bd079b6b7f5e8ad042e8bf3092b61704ae4e33d761bfedc31a2a26db1d93129cbe6b5f5ec792ee75915c99096fdf07eeb10868919
@@ -620,6 +620,10 @@
620
620
  <xsl:text>Édition </xsl:text>
621
621
  </title-edition>
622
622
 
623
+ <title-edition lang="ru">
624
+ <xsl:text>Издание </xsl:text>
625
+ </title-edition>
626
+
623
627
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
624
628
  <title-toc lang="en">
625
629
 
@@ -648,7 +652,11 @@
648
652
 
649
653
 
650
654
 
651
- </title-part>
655
+ </title-part>
656
+ <title-part lang="ru">
657
+
658
+
659
+ </title-part>
652
660
  <title-part lang="zh">第 # 部分:</title-part>
653
661
 
654
662
  <title-subpart lang="en">Sub-part #</title-subpart>
@@ -664,6 +672,7 @@
664
672
 
665
673
  <title-summary lang="en">Summary</title-summary>
666
674
 
675
+ <title-continued lang="ru">(продолжение)</title-continued>
667
676
  <title-continued lang="en">(continued)</title-continued>
668
677
  <title-continued lang="fr">(continué)</title-continued>
669
678
 
@@ -1389,13 +1398,19 @@
1389
1398
  </xsl:attribute-set><xsl:variable name="color-added-text">
1390
1399
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1391
1400
  </xsl:variable><xsl:attribute-set name="add-style">
1392
- <xsl:attribute name="color">red</xsl:attribute>
1393
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1394
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1395
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1396
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1397
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1398
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1401
+
1402
+ <xsl:attribute name="color">red</xsl:attribute>
1403
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1404
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1405
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1406
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1407
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1408
+
1409
+ </xsl:attribute-set><xsl:variable name="add-style">
1410
+ <add-style xsl:use-attribute-sets="add-style"/>
1411
+ </xsl:variable><xsl:template name="append_add-style">
1412
+ <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
1413
+ </xsl:template><xsl:variable name="color-deleted-text">
1399
1414
  <xsl:text>red</xsl:text>
1400
1415
  </xsl:variable><xsl:attribute-set name="del-style">
1401
1416
  <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
@@ -1817,14 +1832,42 @@
1817
1832
 
1818
1833
 
1819
1834
  </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">
1835
+ <xsl:variable name="nodes_preface_">
1836
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1837
+ <node id="{@id}"/>
1838
+ </xsl:for-each>
1839
+ </xsl:variable>
1840
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
1841
+
1820
1842
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1821
1843
  <xsl:sort select="@displayorder" data-type="number"/>
1844
+
1845
+ <!-- process Section's title -->
1846
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1847
+ <xsl:if test="$preceding-sibling_id != ''">
1848
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1849
+ </xsl:if>
1850
+
1822
1851
  <xsl:apply-templates select="." mode="contents"/>
1823
1852
  </xsl:for-each>
1824
1853
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1825
1854
 
1855
+ <xsl:variable name="nodes_sections_">
1856
+ <xsl:for-each select="/*/*[local-name()='sections']/*">
1857
+ <node id="{@id}"/>
1858
+ </xsl:for-each>
1859
+ </xsl:variable>
1860
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
1861
+
1826
1862
  <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']]">
1827
1863
  <xsl:sort select="@displayorder" data-type="number"/>
1864
+
1865
+ <!-- process Section's title -->
1866
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1867
+ <xsl:if test="$preceding-sibling_id != ''">
1868
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1869
+ </xsl:if>
1870
+
1828
1871
  <xsl:apply-templates select="." mode="contents"/>
1829
1872
  </xsl:for-each>
1830
1873
 
@@ -1969,7 +2012,7 @@
1969
2012
  </xsl:call-template>
1970
2013
  </xsl:if>
1971
2014
  </xsl:variable>
1972
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2015
+ <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
1973
2016
 
1974
2017
 
1975
2018
  <xsl:variable name="margin-side">
@@ -2235,7 +2278,7 @@
2235
2278
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2236
2279
  <!-- 2009 thinspace -->
2237
2280
  <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2238
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
2281
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2239
2282
  </xsl:call-template>
2240
2283
  </xsl:variable>
2241
2284
  <xsl:variable name="max_length">
@@ -3864,6 +3907,9 @@
3864
3907
  </fo:inline>
3865
3908
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3866
3909
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3910
+ <xsl:if test="parent::*[local-name() = 'add']">
3911
+ <xsl:call-template name="append_add-style"/>
3912
+ </xsl:if>
3867
3913
  <xsl:apply-templates/>
3868
3914
  </fo:basic-link>
3869
3915
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3961,6 +4007,13 @@
3961
4007
 
3962
4008
 
3963
4009
 
4010
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4011
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
4012
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
4013
+ <xsl:call-template name="append_add-style"/>
4014
+ </xsl:if>
4015
+
4016
+
3964
4017
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3965
4018
  <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3966
4019
  <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
@@ -3999,6 +4052,12 @@
3999
4052
 
4000
4053
 
4001
4054
 
4055
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4056
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
4057
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
4058
+ <xsl:call-template name="append_add-style"/>
4059
+ </xsl:if>
4060
+
4002
4061
  <xsl:apply-templates select="*[local-name() = 'name']"/>
4003
4062
 
4004
4063
  </fo:inline>
@@ -4050,6 +4109,7 @@
4050
4109
  </fo:block>
4051
4110
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4052
4111
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4112
+
4053
4113
 
4054
4114
 
4055
4115
  <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
@@ -4490,7 +4550,11 @@
4490
4550
  <xsl:value-of select="."/>
4491
4551
  </xsl:template><xsl:template match="node()" mode="contents">
4492
4552
  <xsl:apply-templates mode="contents"/>
4493
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4553
+ </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">
4554
+ <xsl:call-template name="contents_section-title"/>
4555
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
4556
+ <xsl:call-template name="contents_section-title"/>
4557
+ </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">
4494
4558
  <xsl:variable name="level">
4495
4559
  <xsl:call-template name="getLevel">
4496
4560
  <xsl:with-param name="depth" select="@depth"/>
@@ -5807,7 +5871,7 @@
5807
5871
 
5808
5872
 
5809
5873
 
5810
-
5874
+
5811
5875
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
5812
5876
  </fo:list-block>
5813
5877
  <!-- <xsl:for-each select="./iho:note">
@@ -5825,6 +5889,11 @@
5825
5889
 
5826
5890
 
5827
5891
 
5892
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5893
+ <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5894
+ <xsl:call-template name="append_add-style"/>
5895
+ </xsl:if>
5896
+
5828
5897
  <xsl:call-template name="getListItemFormat"/>
5829
5898
  </fo:block>
5830
5899
  </fo:list-item-label>
@@ -6908,53 +6977,153 @@
6908
6977
  <xsl:param name="first"/>
6909
6978
  <xsl:if test="$number != ''">
6910
6979
  <xsl:variable name="words">
6911
- <words>
6912
- <word cardinal="1">One-</word>
6913
- <word ordinal="1">First </word>
6914
- <word cardinal="2">Two-</word>
6915
- <word ordinal="2">Second </word>
6916
- <word cardinal="3">Three-</word>
6917
- <word ordinal="3">Third </word>
6918
- <word cardinal="4">Four-</word>
6919
- <word ordinal="4">Fourth </word>
6920
- <word cardinal="5">Five-</word>
6921
- <word ordinal="5">Fifth </word>
6922
- <word cardinal="6">Six-</word>
6923
- <word ordinal="6">Sixth </word>
6924
- <word cardinal="7">Seven-</word>
6925
- <word ordinal="7">Seventh </word>
6926
- <word cardinal="8">Eight-</word>
6927
- <word ordinal="8">Eighth </word>
6928
- <word cardinal="9">Nine-</word>
6929
- <word ordinal="9">Ninth </word>
6930
- <word ordinal="10">Tenth </word>
6931
- <word ordinal="11">Eleventh </word>
6932
- <word ordinal="12">Twelfth </word>
6933
- <word ordinal="13">Thirteenth </word>
6934
- <word ordinal="14">Fourteenth </word>
6935
- <word ordinal="15">Fifteenth </word>
6936
- <word ordinal="16">Sixteenth </word>
6937
- <word ordinal="17">Seventeenth </word>
6938
- <word ordinal="18">Eighteenth </word>
6939
- <word ordinal="19">Nineteenth </word>
6940
- <word cardinal="20">Twenty-</word>
6941
- <word ordinal="20">Twentieth </word>
6942
- <word cardinal="30">Thirty-</word>
6943
- <word ordinal="30">Thirtieth </word>
6944
- <word cardinal="40">Forty-</word>
6945
- <word ordinal="40">Fortieth </word>
6946
- <word cardinal="50">Fifty-</word>
6947
- <word ordinal="50">Fiftieth </word>
6948
- <word cardinal="60">Sixty-</word>
6949
- <word ordinal="60">Sixtieth </word>
6950
- <word cardinal="70">Seventy-</word>
6951
- <word ordinal="70">Seventieth </word>
6952
- <word cardinal="80">Eighty-</word>
6953
- <word ordinal="80">Eightieth </word>
6954
- <word cardinal="90">Ninety-</word>
6955
- <word ordinal="90">Ninetieth </word>
6956
- <word cardinal="100">Hundred-</word>
6957
- <word ordinal="100">Hundredth </word>
6980
+ <words>
6981
+ <xsl:choose>
6982
+ <xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
6983
+ <word cardinal="1">Une-</word>
6984
+ <word ordinal="1">Première </word>
6985
+ <word cardinal="2">Deux-</word>
6986
+ <word ordinal="2">Seconde </word>
6987
+ <word cardinal="3">Trois-</word>
6988
+ <word ordinal="3">Tierce </word>
6989
+ <word cardinal="4">Quatre-</word>
6990
+ <word ordinal="4">Quatrième </word>
6991
+ <word cardinal="5">Cinq-</word>
6992
+ <word ordinal="5">Cinquième </word>
6993
+ <word cardinal="6">Six-</word>
6994
+ <word ordinal="6">Sixième </word>
6995
+ <word cardinal="7">Sept-</word>
6996
+ <word ordinal="7">Septième </word>
6997
+ <word cardinal="8">Huit-</word>
6998
+ <word ordinal="8">Huitième </word>
6999
+ <word cardinal="9">Neuf-</word>
7000
+ <word ordinal="9">Neuvième </word>
7001
+ <word ordinal="10">Dixième </word>
7002
+ <word ordinal="11">Onzième </word>
7003
+ <word ordinal="12">Douzième </word>
7004
+ <word ordinal="13">Treizième </word>
7005
+ <word ordinal="14">Quatorzième </word>
7006
+ <word ordinal="15">Quinzième </word>
7007
+ <word ordinal="16">Seizième </word>
7008
+ <word ordinal="17">Dix-septième </word>
7009
+ <word ordinal="18">Dix-huitième </word>
7010
+ <word ordinal="19">Dix-neuvième </word>
7011
+ <word cardinal="20">Vingt-</word>
7012
+ <word ordinal="20">Vingtième </word>
7013
+ <word cardinal="30">Trente-</word>
7014
+ <word ordinal="30">Trentième </word>
7015
+ <word cardinal="40">Quarante-</word>
7016
+ <word ordinal="40">Quarantième </word>
7017
+ <word cardinal="50">Cinquante-</word>
7018
+ <word ordinal="50">Cinquantième </word>
7019
+ <word cardinal="60">Soixante-</word>
7020
+ <word ordinal="60">Soixantième </word>
7021
+ <word cardinal="70">Septante-</word>
7022
+ <word ordinal="70">Septantième </word>
7023
+ <word cardinal="80">Huitante-</word>
7024
+ <word ordinal="80">Huitantième </word>
7025
+ <word cardinal="90">Nonante-</word>
7026
+ <word ordinal="90">Nonantième </word>
7027
+ <word cardinal="100">Cent-</word>
7028
+ <word ordinal="100">Centième </word>
7029
+ </xsl:when>
7030
+ <xsl:when test="$lang = 'ru'">
7031
+ <word cardinal="1">Одна-</word>
7032
+ <word ordinal="1">Первое </word>
7033
+ <word cardinal="2">Две-</word>
7034
+ <word ordinal="2">Второе </word>
7035
+ <word cardinal="3">Три-</word>
7036
+ <word ordinal="3">Третье </word>
7037
+ <word cardinal="4">Четыре-</word>
7038
+ <word ordinal="4">Четвертое </word>
7039
+ <word cardinal="5">Пять-</word>
7040
+ <word ordinal="5">Пятое </word>
7041
+ <word cardinal="6">Шесть-</word>
7042
+ <word ordinal="6">Шестое </word>
7043
+ <word cardinal="7">Семь-</word>
7044
+ <word ordinal="7">Седьмое </word>
7045
+ <word cardinal="8">Восемь-</word>
7046
+ <word ordinal="8">Восьмое </word>
7047
+ <word cardinal="9">Девять-</word>
7048
+ <word ordinal="9">Девятое </word>
7049
+ <word ordinal="10">Десятое </word>
7050
+ <word ordinal="11">Одиннадцатое </word>
7051
+ <word ordinal="12">Двенадцатое </word>
7052
+ <word ordinal="13">Тринадцатое </word>
7053
+ <word ordinal="14">Четырнадцатое </word>
7054
+ <word ordinal="15">Пятнадцатое </word>
7055
+ <word ordinal="16">Шестнадцатое </word>
7056
+ <word ordinal="17">Семнадцатое </word>
7057
+ <word ordinal="18">Восемнадцатое </word>
7058
+ <word ordinal="19">Девятнадцатое </word>
7059
+ <word cardinal="20">Двадцать-</word>
7060
+ <word ordinal="20">Двадцатое </word>
7061
+ <word cardinal="30">Тридцать-</word>
7062
+ <word ordinal="30">Тридцатое </word>
7063
+ <word cardinal="40">Сорок-</word>
7064
+ <word ordinal="40">Сороковое </word>
7065
+ <word cardinal="50">Пятьдесят-</word>
7066
+ <word ordinal="50">Пятидесятое </word>
7067
+ <word cardinal="60">Шестьдесят-</word>
7068
+ <word ordinal="60">Шестидесятое </word>
7069
+ <word cardinal="70">Семьдесят-</word>
7070
+ <word ordinal="70">Семидесятое </word>
7071
+ <word cardinal="80">Восемьдесят-</word>
7072
+ <word ordinal="80">Восьмидесятое </word>
7073
+ <word cardinal="90">Девяносто-</word>
7074
+ <word ordinal="90">Девяностое </word>
7075
+ <word cardinal="100">Сто-</word>
7076
+ <word ordinal="100">Сотое </word>
7077
+ </xsl:when>
7078
+ <xsl:otherwise> <!-- default english -->
7079
+ <word cardinal="1">One-</word>
7080
+ <word ordinal="1">First </word>
7081
+ <word cardinal="2">Two-</word>
7082
+ <word ordinal="2">Second </word>
7083
+ <word cardinal="3">Three-</word>
7084
+ <word ordinal="3">Third </word>
7085
+ <word cardinal="4">Four-</word>
7086
+ <word ordinal="4">Fourth </word>
7087
+ <word cardinal="5">Five-</word>
7088
+ <word ordinal="5">Fifth </word>
7089
+ <word cardinal="6">Six-</word>
7090
+ <word ordinal="6">Sixth </word>
7091
+ <word cardinal="7">Seven-</word>
7092
+ <word ordinal="7">Seventh </word>
7093
+ <word cardinal="8">Eight-</word>
7094
+ <word ordinal="8">Eighth </word>
7095
+ <word cardinal="9">Nine-</word>
7096
+ <word ordinal="9">Ninth </word>
7097
+ <word ordinal="10">Tenth </word>
7098
+ <word ordinal="11">Eleventh </word>
7099
+ <word ordinal="12">Twelfth </word>
7100
+ <word ordinal="13">Thirteenth </word>
7101
+ <word ordinal="14">Fourteenth </word>
7102
+ <word ordinal="15">Fifteenth </word>
7103
+ <word ordinal="16">Sixteenth </word>
7104
+ <word ordinal="17">Seventeenth </word>
7105
+ <word ordinal="18">Eighteenth </word>
7106
+ <word ordinal="19">Nineteenth </word>
7107
+ <word cardinal="20">Twenty-</word>
7108
+ <word ordinal="20">Twentieth </word>
7109
+ <word cardinal="30">Thirty-</word>
7110
+ <word ordinal="30">Thirtieth </word>
7111
+ <word cardinal="40">Forty-</word>
7112
+ <word ordinal="40">Fortieth </word>
7113
+ <word cardinal="50">Fifty-</word>
7114
+ <word ordinal="50">Fiftieth </word>
7115
+ <word cardinal="60">Sixty-</word>
7116
+ <word ordinal="60">Sixtieth </word>
7117
+ <word cardinal="70">Seventy-</word>
7118
+ <word ordinal="70">Seventieth </word>
7119
+ <word cardinal="80">Eighty-</word>
7120
+ <word ordinal="80">Eightieth </word>
7121
+ <word cardinal="90">Ninety-</word>
7122
+ <word ordinal="90">Ninetieth </word>
7123
+ <word cardinal="100">Hundred-</word>
7124
+ <word ordinal="100">Hundredth </word>
7125
+ </xsl:otherwise>
7126
+ </xsl:choose>
6958
7127
  </words>
6959
7128
  </xsl:variable>
6960
7129
 
@@ -7028,4 +7197,18 @@
7028
7197
  <xsl:otherwise>_</xsl:otherwise>
7029
7198
  </xsl:choose>
7030
7199
  </xsl:attribute>
7200
+ </xsl:template><xsl:template name="substring-after-last">
7201
+ <xsl:param name="value"/>
7202
+ <xsl:param name="delimiter"/>
7203
+ <xsl:choose>
7204
+ <xsl:when test="contains($value, $delimiter)">
7205
+ <xsl:call-template name="substring-after-last">
7206
+ <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
7207
+ <xsl:with-param name="delimiter" select="$delimiter"/>
7208
+ </xsl:call-template>
7209
+ </xsl:when>
7210
+ <xsl:otherwise>
7211
+ <xsl:value-of select="$value"/>
7212
+ </xsl:otherwise>
7213
+ </xsl:choose>
7031
7214
  </xsl:template></xsl:stylesheet>
@@ -620,6 +620,10 @@
620
620
  <xsl:text>Édition </xsl:text>
621
621
  </title-edition>
622
622
 
623
+ <title-edition lang="ru">
624
+ <xsl:text>Издание </xsl:text>
625
+ </title-edition>
626
+
623
627
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
624
628
  <title-toc lang="en">
625
629
 
@@ -648,7 +652,11 @@
648
652
 
649
653
 
650
654
 
651
- </title-part>
655
+ </title-part>
656
+ <title-part lang="ru">
657
+
658
+
659
+ </title-part>
652
660
  <title-part lang="zh">第 # 部分:</title-part>
653
661
 
654
662
  <title-subpart lang="en">Sub-part #</title-subpart>
@@ -664,6 +672,7 @@
664
672
 
665
673
  <title-summary lang="en">Summary</title-summary>
666
674
 
675
+ <title-continued lang="ru">(продолжение)</title-continued>
667
676
  <title-continued lang="en">(continued)</title-continued>
668
677
  <title-continued lang="fr">(continué)</title-continued>
669
678
 
@@ -1389,13 +1398,19 @@
1389
1398
  </xsl:attribute-set><xsl:variable name="color-added-text">
1390
1399
  <xsl:text>rgb(0, 255, 0)</xsl:text>
1391
1400
  </xsl:variable><xsl:attribute-set name="add-style">
1392
- <xsl:attribute name="color">red</xsl:attribute>
1393
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1394
- <!-- <xsl:attribute name="color">black</xsl:attribute>
1395
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1396
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
1397
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1398
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
1401
+
1402
+ <xsl:attribute name="color">red</xsl:attribute>
1403
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1404
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
1405
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
1406
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
1407
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
1408
+
1409
+ </xsl:attribute-set><xsl:variable name="add-style">
1410
+ <add-style xsl:use-attribute-sets="add-style"/>
1411
+ </xsl:variable><xsl:template name="append_add-style">
1412
+ <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
1413
+ </xsl:template><xsl:variable name="color-deleted-text">
1399
1414
  <xsl:text>red</xsl:text>
1400
1415
  </xsl:variable><xsl:attribute-set name="del-style">
1401
1416
  <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
@@ -1817,14 +1832,42 @@
1817
1832
 
1818
1833
 
1819
1834
  </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">
1835
+ <xsl:variable name="nodes_preface_">
1836
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1837
+ <node id="{@id}"/>
1838
+ </xsl:for-each>
1839
+ </xsl:variable>
1840
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
1841
+
1820
1842
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1821
1843
  <xsl:sort select="@displayorder" data-type="number"/>
1844
+
1845
+ <!-- process Section's title -->
1846
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1847
+ <xsl:if test="$preceding-sibling_id != ''">
1848
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1849
+ </xsl:if>
1850
+
1822
1851
  <xsl:apply-templates select="." mode="contents"/>
1823
1852
  </xsl:for-each>
1824
1853
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1825
1854
 
1855
+ <xsl:variable name="nodes_sections_">
1856
+ <xsl:for-each select="/*/*[local-name()='sections']/*">
1857
+ <node id="{@id}"/>
1858
+ </xsl:for-each>
1859
+ </xsl:variable>
1860
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
1861
+
1826
1862
  <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']]">
1827
1863
  <xsl:sort select="@displayorder" data-type="number"/>
1864
+
1865
+ <!-- process Section's title -->
1866
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
1867
+ <xsl:if test="$preceding-sibling_id != ''">
1868
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
1869
+ </xsl:if>
1870
+
1828
1871
  <xsl:apply-templates select="." mode="contents"/>
1829
1872
  </xsl:for-each>
1830
1873
 
@@ -1969,7 +2012,7 @@
1969
2012
  </xsl:call-template>
1970
2013
  </xsl:if>
1971
2014
  </xsl:variable>
1972
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2015
+ <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
1973
2016
 
1974
2017
 
1975
2018
  <xsl:variable name="margin-side">
@@ -2235,7 +2278,7 @@
2235
2278
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
2236
2279
  <!-- 2009 thinspace -->
2237
2280
  <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
2238
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
2281
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
2239
2282
  </xsl:call-template>
2240
2283
  </xsl:variable>
2241
2284
  <xsl:variable name="max_length">
@@ -3864,6 +3907,9 @@
3864
3907
  </fo:inline>
3865
3908
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
3866
3909
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
3910
+ <xsl:if test="parent::*[local-name() = 'add']">
3911
+ <xsl:call-template name="append_add-style"/>
3912
+ </xsl:if>
3867
3913
  <xsl:apply-templates/>
3868
3914
  </fo:basic-link>
3869
3915
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -3961,6 +4007,13 @@
3961
4007
 
3962
4008
 
3963
4009
 
4010
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4011
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
4012
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
4013
+ <xsl:call-template name="append_add-style"/>
4014
+ </xsl:if>
4015
+
4016
+
3964
4017
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
3965
4018
  <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
3966
4019
  <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
@@ -3999,6 +4052,12 @@
3999
4052
 
4000
4053
 
4001
4054
 
4055
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
4056
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
4057
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
4058
+ <xsl:call-template name="append_add-style"/>
4059
+ </xsl:if>
4060
+
4002
4061
  <xsl:apply-templates select="*[local-name() = 'name']"/>
4003
4062
 
4004
4063
  </fo:inline>
@@ -4050,6 +4109,7 @@
4050
4109
  </fo:block>
4051
4110
  </xsl:template><xsl:template match="*[local-name() = 'term']">
4052
4111
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
4112
+
4053
4113
 
4054
4114
 
4055
4115
  <fo:block keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
@@ -4490,7 +4550,11 @@
4490
4550
  <xsl:value-of select="."/>
4491
4551
  </xsl:template><xsl:template match="node()" mode="contents">
4492
4552
  <xsl:apply-templates mode="contents"/>
4493
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
4553
+ </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">
4554
+ <xsl:call-template name="contents_section-title"/>
4555
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
4556
+ <xsl:call-template name="contents_section-title"/>
4557
+ </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">
4494
4558
  <xsl:variable name="level">
4495
4559
  <xsl:call-template name="getLevel">
4496
4560
  <xsl:with-param name="depth" select="@depth"/>
@@ -5807,7 +5871,7 @@
5807
5871
 
5808
5872
 
5809
5873
 
5810
-
5874
+
5811
5875
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
5812
5876
  </fo:list-block>
5813
5877
  <!-- <xsl:for-each select="./iho:note">
@@ -5825,6 +5889,11 @@
5825
5889
 
5826
5890
 
5827
5891
 
5892
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5893
+ <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5894
+ <xsl:call-template name="append_add-style"/>
5895
+ </xsl:if>
5896
+
5828
5897
  <xsl:call-template name="getListItemFormat"/>
5829
5898
  </fo:block>
5830
5899
  </fo:list-item-label>
@@ -6908,53 +6977,153 @@
6908
6977
  <xsl:param name="first"/>
6909
6978
  <xsl:if test="$number != ''">
6910
6979
  <xsl:variable name="words">
6911
- <words>
6912
- <word cardinal="1">One-</word>
6913
- <word ordinal="1">First </word>
6914
- <word cardinal="2">Two-</word>
6915
- <word ordinal="2">Second </word>
6916
- <word cardinal="3">Three-</word>
6917
- <word ordinal="3">Third </word>
6918
- <word cardinal="4">Four-</word>
6919
- <word ordinal="4">Fourth </word>
6920
- <word cardinal="5">Five-</word>
6921
- <word ordinal="5">Fifth </word>
6922
- <word cardinal="6">Six-</word>
6923
- <word ordinal="6">Sixth </word>
6924
- <word cardinal="7">Seven-</word>
6925
- <word ordinal="7">Seventh </word>
6926
- <word cardinal="8">Eight-</word>
6927
- <word ordinal="8">Eighth </word>
6928
- <word cardinal="9">Nine-</word>
6929
- <word ordinal="9">Ninth </word>
6930
- <word ordinal="10">Tenth </word>
6931
- <word ordinal="11">Eleventh </word>
6932
- <word ordinal="12">Twelfth </word>
6933
- <word ordinal="13">Thirteenth </word>
6934
- <word ordinal="14">Fourteenth </word>
6935
- <word ordinal="15">Fifteenth </word>
6936
- <word ordinal="16">Sixteenth </word>
6937
- <word ordinal="17">Seventeenth </word>
6938
- <word ordinal="18">Eighteenth </word>
6939
- <word ordinal="19">Nineteenth </word>
6940
- <word cardinal="20">Twenty-</word>
6941
- <word ordinal="20">Twentieth </word>
6942
- <word cardinal="30">Thirty-</word>
6943
- <word ordinal="30">Thirtieth </word>
6944
- <word cardinal="40">Forty-</word>
6945
- <word ordinal="40">Fortieth </word>
6946
- <word cardinal="50">Fifty-</word>
6947
- <word ordinal="50">Fiftieth </word>
6948
- <word cardinal="60">Sixty-</word>
6949
- <word ordinal="60">Sixtieth </word>
6950
- <word cardinal="70">Seventy-</word>
6951
- <word ordinal="70">Seventieth </word>
6952
- <word cardinal="80">Eighty-</word>
6953
- <word ordinal="80">Eightieth </word>
6954
- <word cardinal="90">Ninety-</word>
6955
- <word ordinal="90">Ninetieth </word>
6956
- <word cardinal="100">Hundred-</word>
6957
- <word ordinal="100">Hundredth </word>
6980
+ <words>
6981
+ <xsl:choose>
6982
+ <xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
6983
+ <word cardinal="1">Une-</word>
6984
+ <word ordinal="1">Première </word>
6985
+ <word cardinal="2">Deux-</word>
6986
+ <word ordinal="2">Seconde </word>
6987
+ <word cardinal="3">Trois-</word>
6988
+ <word ordinal="3">Tierce </word>
6989
+ <word cardinal="4">Quatre-</word>
6990
+ <word ordinal="4">Quatrième </word>
6991
+ <word cardinal="5">Cinq-</word>
6992
+ <word ordinal="5">Cinquième </word>
6993
+ <word cardinal="6">Six-</word>
6994
+ <word ordinal="6">Sixième </word>
6995
+ <word cardinal="7">Sept-</word>
6996
+ <word ordinal="7">Septième </word>
6997
+ <word cardinal="8">Huit-</word>
6998
+ <word ordinal="8">Huitième </word>
6999
+ <word cardinal="9">Neuf-</word>
7000
+ <word ordinal="9">Neuvième </word>
7001
+ <word ordinal="10">Dixième </word>
7002
+ <word ordinal="11">Onzième </word>
7003
+ <word ordinal="12">Douzième </word>
7004
+ <word ordinal="13">Treizième </word>
7005
+ <word ordinal="14">Quatorzième </word>
7006
+ <word ordinal="15">Quinzième </word>
7007
+ <word ordinal="16">Seizième </word>
7008
+ <word ordinal="17">Dix-septième </word>
7009
+ <word ordinal="18">Dix-huitième </word>
7010
+ <word ordinal="19">Dix-neuvième </word>
7011
+ <word cardinal="20">Vingt-</word>
7012
+ <word ordinal="20">Vingtième </word>
7013
+ <word cardinal="30">Trente-</word>
7014
+ <word ordinal="30">Trentième </word>
7015
+ <word cardinal="40">Quarante-</word>
7016
+ <word ordinal="40">Quarantième </word>
7017
+ <word cardinal="50">Cinquante-</word>
7018
+ <word ordinal="50">Cinquantième </word>
7019
+ <word cardinal="60">Soixante-</word>
7020
+ <word ordinal="60">Soixantième </word>
7021
+ <word cardinal="70">Septante-</word>
7022
+ <word ordinal="70">Septantième </word>
7023
+ <word cardinal="80">Huitante-</word>
7024
+ <word ordinal="80">Huitantième </word>
7025
+ <word cardinal="90">Nonante-</word>
7026
+ <word ordinal="90">Nonantième </word>
7027
+ <word cardinal="100">Cent-</word>
7028
+ <word ordinal="100">Centième </word>
7029
+ </xsl:when>
7030
+ <xsl:when test="$lang = 'ru'">
7031
+ <word cardinal="1">Одна-</word>
7032
+ <word ordinal="1">Первое </word>
7033
+ <word cardinal="2">Две-</word>
7034
+ <word ordinal="2">Второе </word>
7035
+ <word cardinal="3">Три-</word>
7036
+ <word ordinal="3">Третье </word>
7037
+ <word cardinal="4">Четыре-</word>
7038
+ <word ordinal="4">Четвертое </word>
7039
+ <word cardinal="5">Пять-</word>
7040
+ <word ordinal="5">Пятое </word>
7041
+ <word cardinal="6">Шесть-</word>
7042
+ <word ordinal="6">Шестое </word>
7043
+ <word cardinal="7">Семь-</word>
7044
+ <word ordinal="7">Седьмое </word>
7045
+ <word cardinal="8">Восемь-</word>
7046
+ <word ordinal="8">Восьмое </word>
7047
+ <word cardinal="9">Девять-</word>
7048
+ <word ordinal="9">Девятое </word>
7049
+ <word ordinal="10">Десятое </word>
7050
+ <word ordinal="11">Одиннадцатое </word>
7051
+ <word ordinal="12">Двенадцатое </word>
7052
+ <word ordinal="13">Тринадцатое </word>
7053
+ <word ordinal="14">Четырнадцатое </word>
7054
+ <word ordinal="15">Пятнадцатое </word>
7055
+ <word ordinal="16">Шестнадцатое </word>
7056
+ <word ordinal="17">Семнадцатое </word>
7057
+ <word ordinal="18">Восемнадцатое </word>
7058
+ <word ordinal="19">Девятнадцатое </word>
7059
+ <word cardinal="20">Двадцать-</word>
7060
+ <word ordinal="20">Двадцатое </word>
7061
+ <word cardinal="30">Тридцать-</word>
7062
+ <word ordinal="30">Тридцатое </word>
7063
+ <word cardinal="40">Сорок-</word>
7064
+ <word ordinal="40">Сороковое </word>
7065
+ <word cardinal="50">Пятьдесят-</word>
7066
+ <word ordinal="50">Пятидесятое </word>
7067
+ <word cardinal="60">Шестьдесят-</word>
7068
+ <word ordinal="60">Шестидесятое </word>
7069
+ <word cardinal="70">Семьдесят-</word>
7070
+ <word ordinal="70">Семидесятое </word>
7071
+ <word cardinal="80">Восемьдесят-</word>
7072
+ <word ordinal="80">Восьмидесятое </word>
7073
+ <word cardinal="90">Девяносто-</word>
7074
+ <word ordinal="90">Девяностое </word>
7075
+ <word cardinal="100">Сто-</word>
7076
+ <word ordinal="100">Сотое </word>
7077
+ </xsl:when>
7078
+ <xsl:otherwise> <!-- default english -->
7079
+ <word cardinal="1">One-</word>
7080
+ <word ordinal="1">First </word>
7081
+ <word cardinal="2">Two-</word>
7082
+ <word ordinal="2">Second </word>
7083
+ <word cardinal="3">Three-</word>
7084
+ <word ordinal="3">Third </word>
7085
+ <word cardinal="4">Four-</word>
7086
+ <word ordinal="4">Fourth </word>
7087
+ <word cardinal="5">Five-</word>
7088
+ <word ordinal="5">Fifth </word>
7089
+ <word cardinal="6">Six-</word>
7090
+ <word ordinal="6">Sixth </word>
7091
+ <word cardinal="7">Seven-</word>
7092
+ <word ordinal="7">Seventh </word>
7093
+ <word cardinal="8">Eight-</word>
7094
+ <word ordinal="8">Eighth </word>
7095
+ <word cardinal="9">Nine-</word>
7096
+ <word ordinal="9">Ninth </word>
7097
+ <word ordinal="10">Tenth </word>
7098
+ <word ordinal="11">Eleventh </word>
7099
+ <word ordinal="12">Twelfth </word>
7100
+ <word ordinal="13">Thirteenth </word>
7101
+ <word ordinal="14">Fourteenth </word>
7102
+ <word ordinal="15">Fifteenth </word>
7103
+ <word ordinal="16">Sixteenth </word>
7104
+ <word ordinal="17">Seventeenth </word>
7105
+ <word ordinal="18">Eighteenth </word>
7106
+ <word ordinal="19">Nineteenth </word>
7107
+ <word cardinal="20">Twenty-</word>
7108
+ <word ordinal="20">Twentieth </word>
7109
+ <word cardinal="30">Thirty-</word>
7110
+ <word ordinal="30">Thirtieth </word>
7111
+ <word cardinal="40">Forty-</word>
7112
+ <word ordinal="40">Fortieth </word>
7113
+ <word cardinal="50">Fifty-</word>
7114
+ <word ordinal="50">Fiftieth </word>
7115
+ <word cardinal="60">Sixty-</word>
7116
+ <word ordinal="60">Sixtieth </word>
7117
+ <word cardinal="70">Seventy-</word>
7118
+ <word ordinal="70">Seventieth </word>
7119
+ <word cardinal="80">Eighty-</word>
7120
+ <word ordinal="80">Eightieth </word>
7121
+ <word cardinal="90">Ninety-</word>
7122
+ <word ordinal="90">Ninetieth </word>
7123
+ <word cardinal="100">Hundred-</word>
7124
+ <word ordinal="100">Hundredth </word>
7125
+ </xsl:otherwise>
7126
+ </xsl:choose>
6958
7127
  </words>
6959
7128
  </xsl:variable>
6960
7129
 
@@ -7028,4 +7197,18 @@
7028
7197
  <xsl:otherwise>_</xsl:otherwise>
7029
7198
  </xsl:choose>
7030
7199
  </xsl:attribute>
7200
+ </xsl:template><xsl:template name="substring-after-last">
7201
+ <xsl:param name="value"/>
7202
+ <xsl:param name="delimiter"/>
7203
+ <xsl:choose>
7204
+ <xsl:when test="contains($value, $delimiter)">
7205
+ <xsl:call-template name="substring-after-last">
7206
+ <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
7207
+ <xsl:with-param name="delimiter" select="$delimiter"/>
7208
+ </xsl:call-template>
7209
+ </xsl:when>
7210
+ <xsl:otherwise>
7211
+ <xsl:value-of select="$value"/>
7212
+ </xsl:otherwise>
7213
+ </xsl:choose>
7031
7214
  </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 M3AAWG
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-m3aawg
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: htmlentities