metanorma-iec 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: 4912b4a758eeb2ef870ccbf98c3b23701c63c691abaceab22220fde852ef53b0
4
- data.tar.gz: 8904c263d8eaae36cb1ed8e463bdbe4d16aa8c114b740e27d19272b3bfb3251f
3
+ metadata.gz: 639e09dbd719fcb6a10c419069b7b0595b62f5ad89469193d459637fe8ca0e6a
4
+ data.tar.gz: 2d684743e60262edb21ab5dc12076e3231fad3503203fc7bb7ade94b29739eab
5
5
  SHA512:
6
- metadata.gz: 8bbcea1b3012449f0c7b12b7c3031233cb87ee6f7c393e52dfa30d08b4792d8d9665c53ffb4481c827301b9db2b9cffa994bb837b4493ebd393e32d08366876c
7
- data.tar.gz: 39849f14f5501bebb447d0188466a2eef1f2337a0f9fe376aba4b66cc1ca11dbccd2a35f884ac1f3066076eb2b3fcef5c951c67677cec7e4ebc0e6f8bc7213b5
6
+ metadata.gz: ca56e7c582289ef5f6b6b7e0de438def4a9eb1a8145c6379f1ddb405d50678c3ddf97a33810d44438da0a0423c5347c4d067fdb9969fe70f063032525b893482
7
+ data.tar.gz: acec50f81d878e1ef29333a9bdcb0544d4a91b981757a36f60ae054a5a2e054cdb9dc457e6751fe8071f3d4b5b2f17d5391a8b8524367d90e166751ae8f4e552
@@ -1957,6 +1957,10 @@
1957
1957
  <xsl:text>Édition </xsl:text>
1958
1958
  </title-edition>
1959
1959
 
1960
+ <title-edition lang="ru">
1961
+ <xsl:text>Издание </xsl:text>
1962
+ </title-edition>
1963
+
1960
1964
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
1961
1965
  <title-toc lang="en">
1962
1966
 
@@ -1987,7 +1991,13 @@
1987
1991
  <xsl:text>Partie #: </xsl:text>
1988
1992
 
1989
1993
 
1990
- </title-part>
1994
+ </title-part>
1995
+ <title-part lang="ru">
1996
+
1997
+
1998
+ <xsl:text>Часть #: </xsl:text>
1999
+
2000
+ </title-part>
1991
2001
  <title-part lang="zh">第 # 部分:</title-part>
1992
2002
 
1993
2003
  <title-subpart lang="en">Sub-part #</title-subpart>
@@ -2003,6 +2013,7 @@
2003
2013
 
2004
2014
  <title-summary lang="en">Summary</title-summary>
2005
2015
 
2016
+ <title-continued lang="ru">(продолжение)</title-continued>
2006
2017
  <title-continued lang="en">(continued)</title-continued>
2007
2018
  <title-continued lang="fr">(continué)</title-continued>
2008
2019
 
@@ -2775,13 +2786,19 @@
2775
2786
  </xsl:attribute-set><xsl:variable name="color-added-text">
2776
2787
  <xsl:text>rgb(0, 255, 0)</xsl:text>
2777
2788
  </xsl:variable><xsl:attribute-set name="add-style">
2778
- <xsl:attribute name="color">red</xsl:attribute>
2779
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2780
- <!-- <xsl:attribute name="color">black</xsl:attribute>
2781
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2782
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
2783
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2784
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
2789
+
2790
+ <xsl:attribute name="color">red</xsl:attribute>
2791
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2792
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
2793
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2794
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2795
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2796
+
2797
+ </xsl:attribute-set><xsl:variable name="add-style">
2798
+ <add-style xsl:use-attribute-sets="add-style"/>
2799
+ </xsl:variable><xsl:template name="append_add-style">
2800
+ <xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
2801
+ </xsl:template><xsl:variable name="color-deleted-text">
2785
2802
  <xsl:text>red</xsl:text>
2786
2803
  </xsl:variable><xsl:attribute-set name="del-style">
2787
2804
  <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
@@ -3218,14 +3235,42 @@
3218
3235
 
3219
3236
 
3220
3237
  </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">
3238
+ <xsl:variable name="nodes_preface_">
3239
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
3240
+ <node id="{@id}"/>
3241
+ </xsl:for-each>
3242
+ </xsl:variable>
3243
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
3244
+
3221
3245
  <xsl:for-each select="/*/*[local-name()='preface']/*">
3222
3246
  <xsl:sort select="@displayorder" data-type="number"/>
3247
+
3248
+ <!-- process Section's title -->
3249
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
3250
+ <xsl:if test="$preceding-sibling_id != ''">
3251
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
3252
+ </xsl:if>
3253
+
3223
3254
  <xsl:apply-templates select="." mode="contents"/>
3224
3255
  </xsl:for-each>
3225
3256
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
3226
3257
 
3258
+ <xsl:variable name="nodes_sections_">
3259
+ <xsl:for-each select="/*/*[local-name()='sections']/*">
3260
+ <node id="{@id}"/>
3261
+ </xsl:for-each>
3262
+ </xsl:variable>
3263
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
3264
+
3227
3265
  <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']]">
3228
3266
  <xsl:sort select="@displayorder" data-type="number"/>
3267
+
3268
+ <!-- process Section's title -->
3269
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
3270
+ <xsl:if test="$preceding-sibling_id != ''">
3271
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="contents_no_displayorder"/>
3272
+ </xsl:if>
3273
+
3229
3274
  <xsl:apply-templates select="." mode="contents"/>
3230
3275
  </xsl:for-each>
3231
3276
 
@@ -3367,7 +3412,7 @@
3367
3412
  </xsl:call-template>
3368
3413
  </xsl:if>
3369
3414
  </xsl:variable>
3370
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
3415
+ <!-- DEBUG colwidths=<xsl:copy-of select="$colwidths"/> -->
3371
3416
 
3372
3417
 
3373
3418
  <xsl:variable name="margin-side">
@@ -3637,7 +3682,7 @@
3637
3682
  <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
3638
3683
  <!-- 2009 thinspace -->
3639
3684
  <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
3640
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
3685
+ <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3641
3686
  </xsl:call-template>
3642
3687
  </xsl:variable>
3643
3688
  <xsl:variable name="max_length">
@@ -5305,6 +5350,9 @@
5305
5350
  </fo:inline>
5306
5351
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
5307
5352
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
5353
+ <xsl:if test="parent::*[local-name() = 'add']">
5354
+ <xsl:call-template name="append_add-style"/>
5355
+ </xsl:if>
5308
5356
  <xsl:apply-templates/>
5309
5357
  </fo:basic-link>
5310
5358
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -5402,6 +5450,13 @@
5402
5450
 
5403
5451
 
5404
5452
 
5453
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5454
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
5455
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5456
+ <xsl:call-template name="append_add-style"/>
5457
+ </xsl:if>
5458
+
5459
+
5405
5460
  <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
5406
5461
  <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
5407
5462
  <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
@@ -5440,6 +5495,12 @@
5440
5495
 
5441
5496
 
5442
5497
 
5498
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
5499
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
5500
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
5501
+ <xsl:call-template name="append_add-style"/>
5502
+ </xsl:if>
5503
+
5443
5504
  <xsl:apply-templates select="*[local-name() = 'name']"/>
5444
5505
 
5445
5506
  </fo:inline>
@@ -5491,6 +5552,7 @@
5491
5552
  </fo:block>
5492
5553
  </xsl:template><xsl:template match="*[local-name() = 'term']">
5493
5554
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
5555
+
5494
5556
 
5495
5557
 
5496
5558
 
@@ -5927,7 +5989,11 @@
5927
5989
  <xsl:value-of select="."/>
5928
5990
  </xsl:template><xsl:template match="node()" mode="contents">
5929
5991
  <xsl:apply-templates mode="contents"/>
5930
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
5992
+ </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">
5993
+ <xsl:call-template name="contents_section-title"/>
5994
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'section-title']" mode="contents_in_clause">
5995
+ <xsl:call-template name="contents_section-title"/>
5996
+ </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">
5931
5997
  <xsl:variable name="level">
5932
5998
  <xsl:call-template name="getLevel">
5933
5999
  <xsl:with-param name="depth" select="@depth"/>
@@ -7249,7 +7315,7 @@
7249
7315
 
7250
7316
 
7251
7317
 
7252
-
7318
+
7253
7319
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
7254
7320
  </fo:list-block>
7255
7321
  <!-- <xsl:for-each select="./iho:note">
@@ -7267,6 +7333,11 @@
7267
7333
 
7268
7334
 
7269
7335
 
7336
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7337
+ <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
7338
+ <xsl:call-template name="append_add-style"/>
7339
+ </xsl:if>
7340
+
7270
7341
  <xsl:call-template name="getListItemFormat"/>
7271
7342
  </fo:block>
7272
7343
  </fo:list-item-label>
@@ -8349,53 +8420,153 @@
8349
8420
  <xsl:param name="first"/>
8350
8421
  <xsl:if test="$number != ''">
8351
8422
  <xsl:variable name="words">
8352
- <words>
8353
- <word cardinal="1">One-</word>
8354
- <word ordinal="1">First </word>
8355
- <word cardinal="2">Two-</word>
8356
- <word ordinal="2">Second </word>
8357
- <word cardinal="3">Three-</word>
8358
- <word ordinal="3">Third </word>
8359
- <word cardinal="4">Four-</word>
8360
- <word ordinal="4">Fourth </word>
8361
- <word cardinal="5">Five-</word>
8362
- <word ordinal="5">Fifth </word>
8363
- <word cardinal="6">Six-</word>
8364
- <word ordinal="6">Sixth </word>
8365
- <word cardinal="7">Seven-</word>
8366
- <word ordinal="7">Seventh </word>
8367
- <word cardinal="8">Eight-</word>
8368
- <word ordinal="8">Eighth </word>
8369
- <word cardinal="9">Nine-</word>
8370
- <word ordinal="9">Ninth </word>
8371
- <word ordinal="10">Tenth </word>
8372
- <word ordinal="11">Eleventh </word>
8373
- <word ordinal="12">Twelfth </word>
8374
- <word ordinal="13">Thirteenth </word>
8375
- <word ordinal="14">Fourteenth </word>
8376
- <word ordinal="15">Fifteenth </word>
8377
- <word ordinal="16">Sixteenth </word>
8378
- <word ordinal="17">Seventeenth </word>
8379
- <word ordinal="18">Eighteenth </word>
8380
- <word ordinal="19">Nineteenth </word>
8381
- <word cardinal="20">Twenty-</word>
8382
- <word ordinal="20">Twentieth </word>
8383
- <word cardinal="30">Thirty-</word>
8384
- <word ordinal="30">Thirtieth </word>
8385
- <word cardinal="40">Forty-</word>
8386
- <word ordinal="40">Fortieth </word>
8387
- <word cardinal="50">Fifty-</word>
8388
- <word ordinal="50">Fiftieth </word>
8389
- <word cardinal="60">Sixty-</word>
8390
- <word ordinal="60">Sixtieth </word>
8391
- <word cardinal="70">Seventy-</word>
8392
- <word ordinal="70">Seventieth </word>
8393
- <word cardinal="80">Eighty-</word>
8394
- <word ordinal="80">Eightieth </word>
8395
- <word cardinal="90">Ninety-</word>
8396
- <word ordinal="90">Ninetieth </word>
8397
- <word cardinal="100">Hundred-</word>
8398
- <word ordinal="100">Hundredth </word>
8423
+ <words>
8424
+ <xsl:choose>
8425
+ <xsl:when test="$lang = 'fr'"> <!-- https://en.wiktionary.org/wiki/Appendix:French_numbers -->
8426
+ <word cardinal="1">Une-</word>
8427
+ <word ordinal="1">Première </word>
8428
+ <word cardinal="2">Deux-</word>
8429
+ <word ordinal="2">Seconde </word>
8430
+ <word cardinal="3">Trois-</word>
8431
+ <word ordinal="3">Tierce </word>
8432
+ <word cardinal="4">Quatre-</word>
8433
+ <word ordinal="4">Quatrième </word>
8434
+ <word cardinal="5">Cinq-</word>
8435
+ <word ordinal="5">Cinquième </word>
8436
+ <word cardinal="6">Six-</word>
8437
+ <word ordinal="6">Sixième </word>
8438
+ <word cardinal="7">Sept-</word>
8439
+ <word ordinal="7">Septième </word>
8440
+ <word cardinal="8">Huit-</word>
8441
+ <word ordinal="8">Huitième </word>
8442
+ <word cardinal="9">Neuf-</word>
8443
+ <word ordinal="9">Neuvième </word>
8444
+ <word ordinal="10">Dixième </word>
8445
+ <word ordinal="11">Onzième </word>
8446
+ <word ordinal="12">Douzième </word>
8447
+ <word ordinal="13">Treizième </word>
8448
+ <word ordinal="14">Quatorzième </word>
8449
+ <word ordinal="15">Quinzième </word>
8450
+ <word ordinal="16">Seizième </word>
8451
+ <word ordinal="17">Dix-septième </word>
8452
+ <word ordinal="18">Dix-huitième </word>
8453
+ <word ordinal="19">Dix-neuvième </word>
8454
+ <word cardinal="20">Vingt-</word>
8455
+ <word ordinal="20">Vingtième </word>
8456
+ <word cardinal="30">Trente-</word>
8457
+ <word ordinal="30">Trentième </word>
8458
+ <word cardinal="40">Quarante-</word>
8459
+ <word ordinal="40">Quarantième </word>
8460
+ <word cardinal="50">Cinquante-</word>
8461
+ <word ordinal="50">Cinquantième </word>
8462
+ <word cardinal="60">Soixante-</word>
8463
+ <word ordinal="60">Soixantième </word>
8464
+ <word cardinal="70">Septante-</word>
8465
+ <word ordinal="70">Septantième </word>
8466
+ <word cardinal="80">Huitante-</word>
8467
+ <word ordinal="80">Huitantième </word>
8468
+ <word cardinal="90">Nonante-</word>
8469
+ <word ordinal="90">Nonantième </word>
8470
+ <word cardinal="100">Cent-</word>
8471
+ <word ordinal="100">Centième </word>
8472
+ </xsl:when>
8473
+ <xsl:when test="$lang = 'ru'">
8474
+ <word cardinal="1">Одна-</word>
8475
+ <word ordinal="1">Первое </word>
8476
+ <word cardinal="2">Две-</word>
8477
+ <word ordinal="2">Второе </word>
8478
+ <word cardinal="3">Три-</word>
8479
+ <word ordinal="3">Третье </word>
8480
+ <word cardinal="4">Четыре-</word>
8481
+ <word ordinal="4">Четвертое </word>
8482
+ <word cardinal="5">Пять-</word>
8483
+ <word ordinal="5">Пятое </word>
8484
+ <word cardinal="6">Шесть-</word>
8485
+ <word ordinal="6">Шестое </word>
8486
+ <word cardinal="7">Семь-</word>
8487
+ <word ordinal="7">Седьмое </word>
8488
+ <word cardinal="8">Восемь-</word>
8489
+ <word ordinal="8">Восьмое </word>
8490
+ <word cardinal="9">Девять-</word>
8491
+ <word ordinal="9">Девятое </word>
8492
+ <word ordinal="10">Десятое </word>
8493
+ <word ordinal="11">Одиннадцатое </word>
8494
+ <word ordinal="12">Двенадцатое </word>
8495
+ <word ordinal="13">Тринадцатое </word>
8496
+ <word ordinal="14">Четырнадцатое </word>
8497
+ <word ordinal="15">Пятнадцатое </word>
8498
+ <word ordinal="16">Шестнадцатое </word>
8499
+ <word ordinal="17">Семнадцатое </word>
8500
+ <word ordinal="18">Восемнадцатое </word>
8501
+ <word ordinal="19">Девятнадцатое </word>
8502
+ <word cardinal="20">Двадцать-</word>
8503
+ <word ordinal="20">Двадцатое </word>
8504
+ <word cardinal="30">Тридцать-</word>
8505
+ <word ordinal="30">Тридцатое </word>
8506
+ <word cardinal="40">Сорок-</word>
8507
+ <word ordinal="40">Сороковое </word>
8508
+ <word cardinal="50">Пятьдесят-</word>
8509
+ <word ordinal="50">Пятидесятое </word>
8510
+ <word cardinal="60">Шестьдесят-</word>
8511
+ <word ordinal="60">Шестидесятое </word>
8512
+ <word cardinal="70">Семьдесят-</word>
8513
+ <word ordinal="70">Семидесятое </word>
8514
+ <word cardinal="80">Восемьдесят-</word>
8515
+ <word ordinal="80">Восьмидесятое </word>
8516
+ <word cardinal="90">Девяносто-</word>
8517
+ <word ordinal="90">Девяностое </word>
8518
+ <word cardinal="100">Сто-</word>
8519
+ <word ordinal="100">Сотое </word>
8520
+ </xsl:when>
8521
+ <xsl:otherwise> <!-- default english -->
8522
+ <word cardinal="1">One-</word>
8523
+ <word ordinal="1">First </word>
8524
+ <word cardinal="2">Two-</word>
8525
+ <word ordinal="2">Second </word>
8526
+ <word cardinal="3">Three-</word>
8527
+ <word ordinal="3">Third </word>
8528
+ <word cardinal="4">Four-</word>
8529
+ <word ordinal="4">Fourth </word>
8530
+ <word cardinal="5">Five-</word>
8531
+ <word ordinal="5">Fifth </word>
8532
+ <word cardinal="6">Six-</word>
8533
+ <word ordinal="6">Sixth </word>
8534
+ <word cardinal="7">Seven-</word>
8535
+ <word ordinal="7">Seventh </word>
8536
+ <word cardinal="8">Eight-</word>
8537
+ <word ordinal="8">Eighth </word>
8538
+ <word cardinal="9">Nine-</word>
8539
+ <word ordinal="9">Ninth </word>
8540
+ <word ordinal="10">Tenth </word>
8541
+ <word ordinal="11">Eleventh </word>
8542
+ <word ordinal="12">Twelfth </word>
8543
+ <word ordinal="13">Thirteenth </word>
8544
+ <word ordinal="14">Fourteenth </word>
8545
+ <word ordinal="15">Fifteenth </word>
8546
+ <word ordinal="16">Sixteenth </word>
8547
+ <word ordinal="17">Seventeenth </word>
8548
+ <word ordinal="18">Eighteenth </word>
8549
+ <word ordinal="19">Nineteenth </word>
8550
+ <word cardinal="20">Twenty-</word>
8551
+ <word ordinal="20">Twentieth </word>
8552
+ <word cardinal="30">Thirty-</word>
8553
+ <word ordinal="30">Thirtieth </word>
8554
+ <word cardinal="40">Forty-</word>
8555
+ <word ordinal="40">Fortieth </word>
8556
+ <word cardinal="50">Fifty-</word>
8557
+ <word ordinal="50">Fiftieth </word>
8558
+ <word cardinal="60">Sixty-</word>
8559
+ <word ordinal="60">Sixtieth </word>
8560
+ <word cardinal="70">Seventy-</word>
8561
+ <word ordinal="70">Seventieth </word>
8562
+ <word cardinal="80">Eighty-</word>
8563
+ <word ordinal="80">Eightieth </word>
8564
+ <word cardinal="90">Ninety-</word>
8565
+ <word ordinal="90">Ninetieth </word>
8566
+ <word cardinal="100">Hundred-</word>
8567
+ <word ordinal="100">Hundredth </word>
8568
+ </xsl:otherwise>
8569
+ </xsl:choose>
8399
8570
  </words>
8400
8571
  </xsl:variable>
8401
8572
 
@@ -8469,4 +8640,18 @@
8469
8640
  <xsl:otherwise>_</xsl:otherwise>
8470
8641
  </xsl:choose>
8471
8642
  </xsl:attribute>
8643
+ </xsl:template><xsl:template name="substring-after-last">
8644
+ <xsl:param name="value"/>
8645
+ <xsl:param name="delimiter"/>
8646
+ <xsl:choose>
8647
+ <xsl:when test="contains($value, $delimiter)">
8648
+ <xsl:call-template name="substring-after-last">
8649
+ <xsl:with-param name="value" select="substring-after($value, $delimiter)"/>
8650
+ <xsl:with-param name="delimiter" select="$delimiter"/>
8651
+ </xsl:call-template>
8652
+ </xsl:when>
8653
+ <xsl:otherwise>
8654
+ <xsl:value-of select="$value"/>
8655
+ </xsl:otherwise>
8656
+ </xsl:choose>
8472
8657
  </xsl:template></xsl:stylesheet>
@@ -13,22 +13,22 @@ module IsoDoc
13
13
  return super unless @is_iev
14
14
  end
15
15
 
16
- def initial_anchor_names(d)
16
+ def initial_anchor_names(docxml)
17
17
  super
18
18
  return unless @is_iev
19
19
 
20
- terms_iev_names(d)
21
- middle_section_asset_names(d)
22
- termnote_anchor_names(d)
23
- termexample_anchor_names(d)
20
+ terms_iev_names(docxml)
21
+ middle_section_asset_names(docxml)
22
+ termnote_anchor_names(docxml)
23
+ termexample_anchor_names(docxml)
24
24
  end
25
25
 
26
- def terms_iev_names(d)
27
- d.xpath(ns("//sections/clause/terms")).each_with_index do |t, i|
26
+ def terms_iev_names(docxml)
27
+ docxml.xpath(ns("//sections/clause/terms")).each_with_index do |t, i|
28
28
  num = "#{@iev_part}-%02d" % [i + 1]
29
29
  @anchors[t["id"]] =
30
30
  { label: num, xref: l10n("#{@labels['section_iev']} #{num}"),
31
- level: 2, type: "clause" }
31
+ level: 2, type: "clause", elem: @labels["section_iev"] }
32
32
  t.xpath(ns("./term")).each_with_index do |c, j|
33
33
  num2 = "%02d" % [j + 1]
34
34
  section_names1(c, "#{num}-#{num2}", 3)
@@ -38,7 +38,8 @@ module IsoDoc
38
38
 
39
39
  def annex_name_lbl(clause, num)
40
40
  obl = l10n("(#{@labels['inform_annex']})")
41
- obl = l10n("(#{@labels['norm_annex']})") if clause["obligation"] == "normative"
41
+ clause["obligation"] == "normative" and
42
+ obl = l10n("(#{@labels['norm_annex']})")
42
43
  l10n("<strong>#{@labels['annex']} #{num}</strong><br/>#{obl}")
43
44
  end
44
45
  end
@@ -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,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.0.3".freeze
3
+ VERSION = "2.0.4".freeze
4
4
  end
5
5
  end
6
6
 
@@ -169,6 +169,8 @@ RSpec.describe IsoDoc do
169
169
  <script current="true">Latn</script>
170
170
  <status>
171
171
  <stage language="">60</stage>
172
+ <stage language='fr'>Norme internationale</stage>
173
+ <stage language='en'>International standard</stage>
172
174
  <substage language="">60</substage>
173
175
  </status>
174
176
  <copyright>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
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: bin
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-iso