metanorma-bipm 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 +4 -4
- data/lib/isodoc/bipm/base_convert.rb +9 -3
- data/lib/isodoc/bipm/bipm.brochure.xsl +242 -59
- data/lib/isodoc/bipm/bipm.guide.xsl +242 -59
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +242 -59
- data/lib/isodoc/bipm/bipm.rapport.xsl +242 -59
- data/lib/isodoc/bipm/jcgm.standard.xsl +242 -59
- data/lib/isodoc/bipm/pdf_convert.rb +4 -4
- data/lib/isodoc/bipm/xref.rb +4 -4
- data/lib/metanorma/bipm/bipm.rng +1 -1
- data/lib/metanorma/bipm/isodoc.rng +73 -3
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -0
- metadata +30 -2
@@ -1736,6 +1736,10 @@
|
|
1736
1736
|
<xsl:text>Édition </xsl:text>
|
1737
1737
|
</title-edition>
|
1738
1738
|
|
1739
|
+
<title-edition lang="ru">
|
1740
|
+
<xsl:text>Издание </xsl:text>
|
1741
|
+
</title-edition>
|
1742
|
+
|
1739
1743
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
1740
1744
|
<title-toc lang="en">
|
1741
1745
|
|
@@ -1762,7 +1766,11 @@
|
|
1762
1766
|
|
1763
1767
|
|
1764
1768
|
|
1765
|
-
</title-part>
|
1769
|
+
</title-part>
|
1770
|
+
<title-part lang="ru">
|
1771
|
+
|
1772
|
+
|
1773
|
+
</title-part>
|
1766
1774
|
<title-part lang="zh">第 # 部分:</title-part>
|
1767
1775
|
|
1768
1776
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
@@ -1778,6 +1786,7 @@
|
|
1778
1786
|
|
1779
1787
|
<title-summary lang="en">Summary</title-summary>
|
1780
1788
|
|
1789
|
+
<title-continued lang="ru">(продолжение)</title-continued>
|
1781
1790
|
<title-continued lang="en">(continued)</title-continued>
|
1782
1791
|
<title-continued lang="fr">(continué)</title-continued>
|
1783
1792
|
|
@@ -2546,13 +2555,19 @@
|
|
2546
2555
|
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2547
2556
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2548
2557
|
</xsl:variable><xsl:attribute-set name="add-style">
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2554
|
-
|
2555
|
-
|
2558
|
+
|
2559
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2560
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2561
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2562
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2563
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2564
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2565
|
+
|
2566
|
+
</xsl:attribute-set><xsl:variable name="add-style">
|
2567
|
+
<add-style xsl:use-attribute-sets="add-style"/>
|
2568
|
+
</xsl:variable><xsl:template name="append_add-style">
|
2569
|
+
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
2570
|
+
</xsl:template><xsl:variable name="color-deleted-text">
|
2556
2571
|
<xsl:text>red</xsl:text>
|
2557
2572
|
</xsl:variable><xsl:attribute-set name="del-style">
|
2558
2573
|
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
@@ -2977,14 +2992,42 @@
|
|
2977
2992
|
<xsl:attribute name="margin-left">25mm</xsl:attribute>
|
2978
2993
|
|
2979
2994
|
</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">
|
2995
|
+
<xsl:variable name="nodes_preface_">
|
2996
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2997
|
+
<node id="{@id}"/>
|
2998
|
+
</xsl:for-each>
|
2999
|
+
</xsl:variable>
|
3000
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
3001
|
+
|
2980
3002
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2981
3003
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3004
|
+
|
3005
|
+
<!-- process Section's title -->
|
3006
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3007
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3008
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3009
|
+
</xsl:if>
|
3010
|
+
|
2982
3011
|
<xsl:apply-templates select="." mode="contents"/>
|
2983
3012
|
</xsl:for-each>
|
2984
3013
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2985
3014
|
|
3015
|
+
<xsl:variable name="nodes_sections_">
|
3016
|
+
<xsl:for-each select="/*/*[local-name()='sections']/*">
|
3017
|
+
<node id="{@id}"/>
|
3018
|
+
</xsl:for-each>
|
3019
|
+
</xsl:variable>
|
3020
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
3021
|
+
|
2986
3022
|
<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']]">
|
2987
3023
|
<xsl:sort select="@displayorder" data-type="number"/>
|
3024
|
+
|
3025
|
+
<!-- process Section's title -->
|
3026
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
3027
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
3028
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
|
3029
|
+
</xsl:if>
|
3030
|
+
|
2988
3031
|
<xsl:apply-templates select="." mode="contents"/>
|
2989
3032
|
</xsl:for-each>
|
2990
3033
|
|
@@ -3119,7 +3162,7 @@
|
|
3119
3162
|
</xsl:call-template>
|
3120
3163
|
</xsl:if>
|
3121
3164
|
</xsl:variable>
|
3122
|
-
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3165
|
+
<!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
|
3123
3166
|
|
3124
3167
|
|
3125
3168
|
<xsl:variable name="margin-side">
|
@@ -3385,7 +3428,7 @@
|
|
3385
3428
|
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
3386
3429
|
<!-- 2009 thinspace -->
|
3387
3430
|
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
3388
|
-
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '
|
3431
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
|
3389
3432
|
</xsl:call-template>
|
3390
3433
|
</xsl:variable>
|
3391
3434
|
<xsl:variable name="max_length">
|
@@ -5104,6 +5147,9 @@
|
|
5104
5147
|
</fo:inline>
|
5105
5148
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5106
5149
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5150
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
5151
|
+
<xsl:call-template name="append_add-style"/>
|
5152
|
+
</xsl:if>
|
5107
5153
|
<xsl:apply-templates/>
|
5108
5154
|
</fo:basic-link>
|
5109
5155
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -5201,6 +5247,13 @@
|
|
5201
5247
|
|
5202
5248
|
|
5203
5249
|
|
5250
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5251
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5252
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5253
|
+
<xsl:call-template name="append_add-style"/>
|
5254
|
+
</xsl:if>
|
5255
|
+
|
5256
|
+
|
5204
5257
|
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
5205
5258
|
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
5206
5259
|
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
@@ -5239,6 +5292,12 @@
|
|
5239
5292
|
|
5240
5293
|
|
5241
5294
|
|
5295
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
5296
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
5297
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
5298
|
+
<xsl:call-template name="append_add-style"/>
|
5299
|
+
</xsl:if>
|
5300
|
+
|
5242
5301
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
5243
5302
|
|
5244
5303
|
</fo:inline>
|
@@ -5290,6 +5349,7 @@
|
|
5290
5349
|
</fo:block>
|
5291
5350
|
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
5292
5351
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
5352
|
+
|
5293
5353
|
|
5294
5354
|
|
5295
5355
|
|
@@ -5726,7 +5786,11 @@
|
|
5726
5786
|
<xsl:value-of select="."/>
|
5727
5787
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5728
5788
|
<xsl:apply-templates mode="contents"/>
|
5729
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = '
|
5789
|
+
</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">
|
5790
|
+
<xsl:call-template name="contents_section-title"/>
|
5791
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
|
5792
|
+
<xsl:call-template name="contents_section-title"/>
|
5793
|
+
</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">
|
5730
5794
|
<xsl:variable name="level">
|
5731
5795
|
<xsl:call-template name="getLevel">
|
5732
5796
|
<xsl:with-param name="depth" select="@depth"/>
|
@@ -7053,7 +7117,7 @@
|
|
7053
7117
|
|
7054
7118
|
|
7055
7119
|
|
7056
|
-
|
7120
|
+
|
7057
7121
|
<xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
|
7058
7122
|
</fo:list-block>
|
7059
7123
|
<!-- <xsl:for-each select="./iho:note">
|
@@ -7071,6 +7135,11 @@
|
|
7071
7135
|
|
7072
7136
|
|
7073
7137
|
|
7138
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7139
|
+
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7140
|
+
<xsl:call-template name="append_add-style"/>
|
7141
|
+
</xsl:if>
|
7142
|
+
|
7074
7143
|
<xsl:call-template name="getListItemFormat"/>
|
7075
7144
|
</fo:block>
|
7076
7145
|
</fo:list-item-label>
|
@@ -8152,53 +8221,153 @@
|
|
8152
8221
|
<xsl:param name="first"/>
|
8153
8222
|
<xsl:if test="$number != ''">
|
8154
8223
|
<xsl:variable name="words">
|
8155
|
-
|
8156
|
-
<
|
8157
|
-
|
8158
|
-
|
8159
|
-
|
8160
|
-
|
8161
|
-
|
8162
|
-
|
8163
|
-
|
8164
|
-
|
8165
|
-
|
8166
|
-
|
8167
|
-
|
8168
|
-
|
8169
|
-
|
8170
|
-
|
8171
|
-
|
8172
|
-
|
8173
|
-
|
8174
|
-
|
8175
|
-
|
8176
|
-
|
8177
|
-
|
8178
|
-
|
8179
|
-
|
8180
|
-
|
8181
|
-
|
8182
|
-
|
8183
|
-
|
8184
|
-
|
8185
|
-
|
8186
|
-
|
8187
|
-
|
8188
|
-
|
8189
|
-
|
8190
|
-
|
8191
|
-
|
8192
|
-
|
8193
|
-
|
8194
|
-
|
8195
|
-
|
8196
|
-
|
8197
|
-
|
8198
|
-
|
8199
|
-
|
8200
|
-
|
8201
|
-
|
8224
|
+
<words>
|
8225
|
+
<xsl:choose>
|
8226
|
+
<xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
|
8227
|
+
<word cardinal="1">Une-</word>
|
8228
|
+
<word ordinal="1">Première </word>
|
8229
|
+
<word cardinal="2">Deux-</word>
|
8230
|
+
<word ordinal="2">Seconde </word>
|
8231
|
+
<word cardinal="3">Trois-</word>
|
8232
|
+
<word ordinal="3">Tierce </word>
|
8233
|
+
<word cardinal="4">Quatre-</word>
|
8234
|
+
<word ordinal="4">Quatrième </word>
|
8235
|
+
<word cardinal="5">Cinq-</word>
|
8236
|
+
<word ordinal="5">Cinquième </word>
|
8237
|
+
<word cardinal="6">Six-</word>
|
8238
|
+
<word ordinal="6">Sixième </word>
|
8239
|
+
<word cardinal="7">Sept-</word>
|
8240
|
+
<word ordinal="7">Septième </word>
|
8241
|
+
<word cardinal="8">Huit-</word>
|
8242
|
+
<word ordinal="8">Huitième </word>
|
8243
|
+
<word cardinal="9">Neuf-</word>
|
8244
|
+
<word ordinal="9">Neuvième </word>
|
8245
|
+
<word ordinal="10">Dixième </word>
|
8246
|
+
<word ordinal="11">Onzième </word>
|
8247
|
+
<word ordinal="12">Douzième </word>
|
8248
|
+
<word ordinal="13">Treizième </word>
|
8249
|
+
<word ordinal="14">Quatorzième </word>
|
8250
|
+
<word ordinal="15">Quinzième </word>
|
8251
|
+
<word ordinal="16">Seizième </word>
|
8252
|
+
<word ordinal="17">Dix-septième </word>
|
8253
|
+
<word ordinal="18">Dix-huitième </word>
|
8254
|
+
<word ordinal="19">Dix-neuvième </word>
|
8255
|
+
<word cardinal="20">Vingt-</word>
|
8256
|
+
<word ordinal="20">Vingtième </word>
|
8257
|
+
<word cardinal="30">Trente-</word>
|
8258
|
+
<word ordinal="30">Trentième </word>
|
8259
|
+
<word cardinal="40">Quarante-</word>
|
8260
|
+
<word ordinal="40">Quarantième </word>
|
8261
|
+
<word cardinal="50">Cinquante-</word>
|
8262
|
+
<word ordinal="50">Cinquantième </word>
|
8263
|
+
<word cardinal="60">Soixante-</word>
|
8264
|
+
<word ordinal="60">Soixantième </word>
|
8265
|
+
<word cardinal="70">Septante-</word>
|
8266
|
+
<word ordinal="70">Septantième </word>
|
8267
|
+
<word cardinal="80">Huitante-</word>
|
8268
|
+
<word ordinal="80">Huitantième </word>
|
8269
|
+
<word cardinal="90">Nonante-</word>
|
8270
|
+
<word ordinal="90">Nonantième </word>
|
8271
|
+
<word cardinal="100">Cent-</word>
|
8272
|
+
<word ordinal="100">Centième </word>
|
8273
|
+
</xsl:when>
|
8274
|
+
<xsl:when test="$lang = 'ru'">
|
8275
|
+
<word cardinal="1">Одна-</word>
|
8276
|
+
<word ordinal="1">Первое </word>
|
8277
|
+
<word cardinal="2">Две-</word>
|
8278
|
+
<word ordinal="2">Второе </word>
|
8279
|
+
<word cardinal="3">Три-</word>
|
8280
|
+
<word ordinal="3">Третье </word>
|
8281
|
+
<word cardinal="4">Четыре-</word>
|
8282
|
+
<word ordinal="4">Четвертое </word>
|
8283
|
+
<word cardinal="5">Пять-</word>
|
8284
|
+
<word ordinal="5">Пятое </word>
|
8285
|
+
<word cardinal="6">Шесть-</word>
|
8286
|
+
<word ordinal="6">Шестое </word>
|
8287
|
+
<word cardinal="7">Семь-</word>
|
8288
|
+
<word ordinal="7">Седьмое </word>
|
8289
|
+
<word cardinal="8">Восемь-</word>
|
8290
|
+
<word ordinal="8">Восьмое </word>
|
8291
|
+
<word cardinal="9">Девять-</word>
|
8292
|
+
<word ordinal="9">Девятое </word>
|
8293
|
+
<word ordinal="10">Десятое </word>
|
8294
|
+
<word ordinal="11">Одиннадцатое </word>
|
8295
|
+
<word ordinal="12">Двенадцатое </word>
|
8296
|
+
<word ordinal="13">Тринадцатое </word>
|
8297
|
+
<word ordinal="14">Четырнадцатое </word>
|
8298
|
+
<word ordinal="15">Пятнадцатое </word>
|
8299
|
+
<word ordinal="16">Шестнадцатое </word>
|
8300
|
+
<word ordinal="17">Семнадцатое </word>
|
8301
|
+
<word ordinal="18">Восемнадцатое </word>
|
8302
|
+
<word ordinal="19">Девятнадцатое </word>
|
8303
|
+
<word cardinal="20">Двадцать-</word>
|
8304
|
+
<word ordinal="20">Двадцатое </word>
|
8305
|
+
<word cardinal="30">Тридцать-</word>
|
8306
|
+
<word ordinal="30">Тридцатое </word>
|
8307
|
+
<word cardinal="40">Сорок-</word>
|
8308
|
+
<word ordinal="40">Сороковое </word>
|
8309
|
+
<word cardinal="50">Пятьдесят-</word>
|
8310
|
+
<word ordinal="50">Пятидесятое </word>
|
8311
|
+
<word cardinal="60">Шестьдесят-</word>
|
8312
|
+
<word ordinal="60">Шестидесятое </word>
|
8313
|
+
<word cardinal="70">Семьдесят-</word>
|
8314
|
+
<word ordinal="70">Семидесятое </word>
|
8315
|
+
<word cardinal="80">Восемьдесят-</word>
|
8316
|
+
<word ordinal="80">Восьмидесятое </word>
|
8317
|
+
<word cardinal="90">Девяносто-</word>
|
8318
|
+
<word ordinal="90">Девяностое </word>
|
8319
|
+
<word cardinal="100">Сто-</word>
|
8320
|
+
<word ordinal="100">Сотое </word>
|
8321
|
+
</xsl:when>
|
8322
|
+
<xsl:otherwise> <!-- default english -->
|
8323
|
+
<word cardinal="1">One-</word>
|
8324
|
+
<word ordinal="1">First </word>
|
8325
|
+
<word cardinal="2">Two-</word>
|
8326
|
+
<word ordinal="2">Second </word>
|
8327
|
+
<word cardinal="3">Three-</word>
|
8328
|
+
<word ordinal="3">Third </word>
|
8329
|
+
<word cardinal="4">Four-</word>
|
8330
|
+
<word ordinal="4">Fourth </word>
|
8331
|
+
<word cardinal="5">Five-</word>
|
8332
|
+
<word ordinal="5">Fifth </word>
|
8333
|
+
<word cardinal="6">Six-</word>
|
8334
|
+
<word ordinal="6">Sixth </word>
|
8335
|
+
<word cardinal="7">Seven-</word>
|
8336
|
+
<word ordinal="7">Seventh </word>
|
8337
|
+
<word cardinal="8">Eight-</word>
|
8338
|
+
<word ordinal="8">Eighth </word>
|
8339
|
+
<word cardinal="9">Nine-</word>
|
8340
|
+
<word ordinal="9">Ninth </word>
|
8341
|
+
<word ordinal="10">Tenth </word>
|
8342
|
+
<word ordinal="11">Eleventh </word>
|
8343
|
+
<word ordinal="12">Twelfth </word>
|
8344
|
+
<word ordinal="13">Thirteenth </word>
|
8345
|
+
<word ordinal="14">Fourteenth </word>
|
8346
|
+
<word ordinal="15">Fifteenth </word>
|
8347
|
+
<word ordinal="16">Sixteenth </word>
|
8348
|
+
<word ordinal="17">Seventeenth </word>
|
8349
|
+
<word ordinal="18">Eighteenth </word>
|
8350
|
+
<word ordinal="19">Nineteenth </word>
|
8351
|
+
<word cardinal="20">Twenty-</word>
|
8352
|
+
<word ordinal="20">Twentieth </word>
|
8353
|
+
<word cardinal="30">Thirty-</word>
|
8354
|
+
<word ordinal="30">Thirtieth </word>
|
8355
|
+
<word cardinal="40">Forty-</word>
|
8356
|
+
<word ordinal="40">Fortieth </word>
|
8357
|
+
<word cardinal="50">Fifty-</word>
|
8358
|
+
<word ordinal="50">Fiftieth </word>
|
8359
|
+
<word cardinal="60">Sixty-</word>
|
8360
|
+
<word ordinal="60">Sixtieth </word>
|
8361
|
+
<word cardinal="70">Seventy-</word>
|
8362
|
+
<word ordinal="70">Seventieth </word>
|
8363
|
+
<word cardinal="80">Eighty-</word>
|
8364
|
+
<word ordinal="80">Eightieth </word>
|
8365
|
+
<word cardinal="90">Ninety-</word>
|
8366
|
+
<word ordinal="90">Ninetieth </word>
|
8367
|
+
<word cardinal="100">Hundred-</word>
|
8368
|
+
<word ordinal="100">Hundredth </word>
|
8369
|
+
</xsl:otherwise>
|
8370
|
+
</xsl:choose>
|
8202
8371
|
</words>
|
8203
8372
|
</xsl:variable>
|
8204
8373
|
|
@@ -8272,4 +8441,18 @@
|
|
8272
8441
|
<xsl:otherwise>_</xsl:otherwise>
|
8273
8442
|
</xsl:choose>
|
8274
8443
|
</xsl:attribute>
|
8444
|
+
</xsl:template><xsl:template name="substring-after-last">
|
8445
|
+
<xsl:param name="value"/>
|
8446
|
+
<xsl:param name="delimiter"/>
|
8447
|
+
<xsl:choose>
|
8448
|
+
<xsl:when test="contains($value, $delimiter)">
|
8449
|
+
<xsl:call-template name="substring-after-last">
|
8450
|
+
<xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
|
8451
|
+
<xsl:with-param name="delimiter" select="$delimiter"/>
|
8452
|
+
</xsl:call-template>
|
8453
|
+
</xsl:when>
|
8454
|
+
<xsl:otherwise>
|
8455
|
+
<xsl:value-of select="$value"/>
|
8456
|
+
</xsl:otherwise>
|
8457
|
+
</xsl:choose>
|
8275
8458
|
</xsl:template></xsl:stylesheet>
|
@@ -31,12 +31,12 @@ module IsoDoc
|
|
31
31
|
if docxml.root.name == "metanorma-collection" &&
|
32
32
|
docxml.at("#{q}[. = 'fr']", "m" => n) &&
|
33
33
|
docxml.at("#{q}[. = 'en']", "m" => n)
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
return super.tap do |h|
|
35
|
+
h["--split-by-language"] = nil
|
36
|
+
end
|
37
37
|
end
|
38
|
+
super
|
38
39
|
end
|
39
40
|
end
|
40
41
|
end
|
41
42
|
end
|
42
|
-
|
data/lib/isodoc/bipm/xref.rb
CHANGED
@@ -76,7 +76,7 @@ module IsoDoc
|
|
76
76
|
lbl = @jcgm ? "clause_jcgm" : "clause"
|
77
77
|
@anchors[clause["id"]] =
|
78
78
|
{ label: num.print, xref: l10n("#{@labels[lbl]} #{num.print}"),
|
79
|
-
level: lvl, type: "clause" }
|
79
|
+
level: lvl, type: "clause", elem: @labels[lbl] }
|
80
80
|
end
|
81
81
|
|
82
82
|
def section_names(clause, num, lvl)
|
@@ -110,7 +110,7 @@ module IsoDoc
|
|
110
110
|
lbl = @jcgm ? "" : "#{@labels['subclause']} "
|
111
111
|
@anchors[clause["id"]] =
|
112
112
|
{ label: num, level: level, xref: l10n("#{lbl}#{num}"),
|
113
|
-
type: "clause" }
|
113
|
+
type: "clause", elem: lbl }
|
114
114
|
end
|
115
115
|
|
116
116
|
def section_names1(clause, num, level)
|
@@ -148,7 +148,7 @@ module IsoDoc
|
|
148
148
|
|
149
149
|
def annex_name_anchors(clause, num)
|
150
150
|
{ label: annex_name_lbl(clause, num), type: "clause", value: num.to_s,
|
151
|
-
xref: l10n("#{@annexlbl} #{num}"), level: 1 }
|
151
|
+
xref: l10n("#{@annexlbl} #{num}"), level: 1, elem: @annexlbl }
|
152
152
|
end
|
153
153
|
|
154
154
|
def annex_names(clause, num)
|
@@ -188,7 +188,7 @@ module IsoDoc
|
|
188
188
|
def annex_names1_anchors(num, level)
|
189
189
|
lbl = @jcgm ? "" : "#{@annexlbl} "
|
190
190
|
{ label: num, xref: l10n("#{lbl}#{num}"),
|
191
|
-
level: level, type: "clause" }
|
191
|
+
level: level, type: "clause", elem: lbl }
|
192
192
|
end
|
193
193
|
|
194
194
|
def annex_names1(clause, num, level)
|
data/lib/metanorma/bipm/bipm.rng
CHANGED
@@ -152,9 +152,7 @@
|
|
152
152
|
<data type="boolean"/>
|
153
153
|
</attribute>
|
154
154
|
</optional>
|
155
|
-
<
|
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>
|
data/metanorma-bipm.gemspec
CHANGED
@@ -39,4 +39,6 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency "sassc", "2.4.0"
|
40
40
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
41
41
|
spec.add_development_dependency "timecop", "~> 0.9"
|
42
|
+
spec.add_development_dependency "vcr", "~> 5.0.0"
|
43
|
+
spec.add_development_dependency "webmock"
|
42
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
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-
|
11
|
+
date: 2022-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -178,6 +178,34 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0.9'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: vcr
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 5.0.0
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 5.0.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: webmock
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
181
209
|
description: |
|
182
210
|
metanorma-vg lets you write Bureau International de Poids et Mesures (BIPM) standards in Metanorma syntax.
|
183
211
|
|