metanorma-itu 1.3.3 → 1.3.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: abe00a3be60da453e63ef90f89f6be09bbcd8219270d56f0f6fbdebe13a8c97c
4
- data.tar.gz: 6fbdec84993231e9ebd5c715114233e87b76fe20ddaedc61aa1c7812049d1ee6
3
+ metadata.gz: 621588f887228ab3427bf392ab3bedbdf1716c551cd7806c48eac05fdf5dfdae
4
+ data.tar.gz: 2a290310e1b75d15766786b02b462b9cd94eb982be50235dfb83b24d63d7ecba
5
5
  SHA512:
6
- metadata.gz: b365b22f8af65becbd4efed9d1307fc815d4ab5f030dfac299ea8d590de0831ebd26c8e1dd00d9317b43b25923bd103014f9c3ae10a2fbcfb5b72f19de323cdb
7
- data.tar.gz: 5adbd13617676d55221644f2c4fd07ae62487bde807d48cea93ac2b9525261f6982e41da94da04dda4ba01cc9eeb08c75184cd9b619ce0e025200298a560173d
6
+ metadata.gz: 8d2c873817838b6cb6d4a518403c97d981a8046e420f0c8a2e020d4b2bb2558805275e3e5d17bcddf685151113d41b21aebec45d7cec39faf4990bae6c7f2dc3
7
+ data.tar.gz: 6d6048e9fa1500f1f97facb582b582cf950e3f34b48ae255e0fc69a37c0166f31a218d85acc1d459a3c5a2eaec414a338157ca72413f2d6a503f7c29e9c164f5
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
@@ -40,3 +30,14 @@ jobs:
40
30
  bundler-cache: true
41
31
 
42
32
  - run: bundle exec rake
33
+
34
+ tests-passed:
35
+ needs: rake
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: peter-evans/repository-dispatch@v1
39
+ with:
40
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
+ repository: ${{ github.repository }}
42
+ event-type: tests-passed
43
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,12 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
10
  TargetRubyVersion: 2.4
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -890,6 +898,14 @@
890
898
  </define>
891
899
  </include>
892
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
893
909
  <define name="colgroup">
894
910
  <element name="colgroup">
895
911
  <oneOrMore>
@@ -87,6 +87,9 @@
87
87
  <optional>
88
88
  <ref name="doctype"/>
89
89
  </optional>
90
+ <optional>
91
+ <ref name="docsubtype"/>
92
+ </optional>
90
93
  <ref name="editorialgroup"/>
91
94
  <zeroOrMore>
92
95
  <ref name="ics"/>
@@ -2096,6 +2096,7 @@
2096
2096
 
2097
2097
 
2098
2098
 
2099
+
2099
2100
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2100
2101
  <xsl:attribute name="white-space">pre</xsl:attribute>
2101
2102
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2157,6 +2158,7 @@
2157
2158
 
2158
2159
 
2159
2160
 
2161
+
2160
2162
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
2161
2163
 
2162
2164
 
@@ -2175,9 +2177,7 @@
2175
2177
 
2176
2178
 
2177
2179
 
2178
-
2179
-
2180
-
2180
+
2181
2181
 
2182
2182
 
2183
2183
 
@@ -2225,6 +2225,7 @@
2225
2225
 
2226
2226
 
2227
2227
 
2228
+
2228
2229
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2229
2230
 
2230
2231
 
@@ -2241,6 +2242,7 @@
2241
2242
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2242
2243
 
2243
2244
 
2245
+
2244
2246
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
2245
2247
 
2246
2248
 
@@ -2249,6 +2251,7 @@
2249
2251
 
2250
2252
 
2251
2253
 
2254
+
2252
2255
  </xsl:attribute-set><xsl:attribute-set name="note-style">
2253
2256
 
2254
2257
 
@@ -2338,10 +2341,12 @@
2338
2341
 
2339
2342
 
2340
2343
 
2344
+
2341
2345
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2342
2346
 
2343
2347
 
2344
2348
 
2349
+
2345
2350
  </xsl:attribute-set><xsl:attribute-set name="term-style">
2346
2351
 
2347
2352
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -2417,8 +2422,10 @@
2417
2422
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2418
2423
 
2419
2424
 
2425
+
2420
2426
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2421
2427
 
2428
+
2422
2429
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
2423
2430
 
2424
2431
 
@@ -3189,6 +3196,7 @@
3189
3196
 
3190
3197
 
3191
3198
 
3199
+
3192
3200
  <xsl:if test="$lang = 'ar'">
3193
3201
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3194
3202
  </xsl:if>
@@ -3576,6 +3584,7 @@
3576
3584
 
3577
3585
 
3578
3586
 
3587
+
3579
3588
  <xsl:variable name="title-key">
3580
3589
 
3581
3590
 
@@ -3874,6 +3883,8 @@
3874
3883
 
3875
3884
  <xsl:apply-templates/>
3876
3885
  </fo:inline>
3886
+ </xsl:template><xsl:template match="*[local-name()='padding']">
3887
+ <fo:inline padding-right="{@value}"> </fo:inline>
3877
3888
  </xsl:template><xsl:template match="*[local-name()='sup']">
3878
3889
  <fo:inline font-size="80%" vertical-align="super">
3879
3890
  <xsl:apply-templates/>
@@ -4366,6 +4377,16 @@
4366
4377
  <mathml:mspace width="0.5ex"/>
4367
4378
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4368
4379
  <xsl:variable name="target">
4380
+ <xsl:choose>
4381
+ <xsl:when test="@updatetype = 'true'">
4382
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
4383
+ </xsl:when>
4384
+ <xsl:otherwise>
4385
+ <xsl:value-of select="normalize-space(@target)"/>
4386
+ </xsl:otherwise>
4387
+ </xsl:choose>
4388
+ </xsl:variable>
4389
+ <xsl:variable name="target_text">
4369
4390
  <xsl:choose>
4370
4391
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
4371
4392
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -4378,19 +4399,19 @@
4378
4399
  <fo:inline xsl:use-attribute-sets="link-style">
4379
4400
 
4380
4401
  <xsl:choose>
4381
- <xsl:when test="$target = ''">
4402
+ <xsl:when test="$target_text = ''">
4382
4403
  <xsl:apply-templates/>
4383
4404
  </xsl:when>
4384
4405
  <xsl:otherwise>
4385
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4406
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
4386
4407
  <xsl:choose>
4387
4408
  <xsl:when test="normalize-space(.) = ''">
4388
- <!-- <xsl:value-of select="$target"/> -->
4389
4409
  <xsl:call-template name="add-zero-spaces-link-java">
4390
- <xsl:with-param name="text" select="$target"/>
4410
+ <xsl:with-param name="text" select="$target_text"/>
4391
4411
  </xsl:call-template>
4392
4412
  </xsl:when>
4393
4413
  <xsl:otherwise>
4414
+ <!-- output text from <link>text</link> -->
4394
4415
  <xsl:apply-templates/>
4395
4416
  </xsl:otherwise>
4396
4417
  </xsl:choose>
@@ -4972,6 +4993,7 @@
4972
4993
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4973
4994
 
4974
4995
  <fo:block-container margin-left="0mm">
4996
+ <xsl:copy-of select="@id"/>
4975
4997
  <xsl:if test="parent::*[local-name() = 'note']">
4976
4998
  <xsl:attribute name="margin-left">
4977
4999
  <xsl:choose>
@@ -5249,6 +5271,7 @@
5249
5271
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5250
5272
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5251
5273
 
5274
+
5252
5275
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5253
5276
 
5254
5277
  <xsl:variable name="element">
@@ -5458,6 +5481,7 @@
5458
5481
 
5459
5482
 
5460
5483
 
5484
+
5461
5485
  <xsl:choose>
5462
5486
  <xsl:when test="$depth = 5">7</xsl:when>
5463
5487
  <xsl:when test="$depth = 4">10</xsl:when>
@@ -6153,6 +6177,9 @@
6153
6177
  <xsl:when test="parent::*[local-name() = 'preface']">
6154
6178
  <xsl:value-of select="$level_total - 1"/>
6155
6179
  </xsl:when>
6180
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
6181
+ <xsl:value-of select="$level_total - 1"/>
6182
+ </xsl:when>
6156
6183
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6157
6184
  <xsl:value-of select="$level_total - 2"/>
6158
6185
  </xsl:when>
@@ -6293,7 +6320,14 @@
6293
6320
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6294
6321
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6295
6322
  </xsl:when>
6296
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
6323
+ <xsl:otherwise>
6324
+ <xsl:variable name="key_">
6325
+ <xsl:call-template name="capitalize">
6326
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
6327
+ </xsl:call-template>
6328
+ </xsl:variable>
6329
+ <xsl:value-of select="$key_"/>
6330
+ </xsl:otherwise>
6297
6331
  </xsl:choose>
6298
6332
 
6299
6333
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -2096,6 +2096,7 @@
2096
2096
 
2097
2097
 
2098
2098
 
2099
+
2099
2100
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2100
2101
  <xsl:attribute name="white-space">pre</xsl:attribute>
2101
2102
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2157,6 +2158,7 @@
2157
2158
 
2158
2159
 
2159
2160
 
2161
+
2160
2162
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
2161
2163
 
2162
2164
 
@@ -2175,9 +2177,7 @@
2175
2177
 
2176
2178
 
2177
2179
 
2178
-
2179
-
2180
-
2180
+
2181
2181
 
2182
2182
 
2183
2183
 
@@ -2225,6 +2225,7 @@
2225
2225
 
2226
2226
 
2227
2227
 
2228
+
2228
2229
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2229
2230
 
2230
2231
 
@@ -2241,6 +2242,7 @@
2241
2242
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2242
2243
 
2243
2244
 
2245
+
2244
2246
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
2245
2247
 
2246
2248
 
@@ -2249,6 +2251,7 @@
2249
2251
 
2250
2252
 
2251
2253
 
2254
+
2252
2255
  </xsl:attribute-set><xsl:attribute-set name="note-style">
2253
2256
 
2254
2257
 
@@ -2338,10 +2341,12 @@
2338
2341
 
2339
2342
 
2340
2343
 
2344
+
2341
2345
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
2342
2346
 
2343
2347
 
2344
2348
 
2349
+
2345
2350
  </xsl:attribute-set><xsl:attribute-set name="term-style">
2346
2351
 
2347
2352
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -2417,8 +2422,10 @@
2417
2422
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2418
2423
 
2419
2424
 
2425
+
2420
2426
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2421
2427
 
2428
+
2422
2429
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
2423
2430
 
2424
2431
 
@@ -3189,6 +3196,7 @@
3189
3196
 
3190
3197
 
3191
3198
 
3199
+
3192
3200
  <xsl:if test="$lang = 'ar'">
3193
3201
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3194
3202
  </xsl:if>
@@ -3576,6 +3584,7 @@
3576
3584
 
3577
3585
 
3578
3586
 
3587
+
3579
3588
  <xsl:variable name="title-key">
3580
3589
 
3581
3590
 
@@ -3874,6 +3883,8 @@
3874
3883
 
3875
3884
  <xsl:apply-templates/>
3876
3885
  </fo:inline>
3886
+ </xsl:template><xsl:template match="*[local-name()='padding']">
3887
+ <fo:inline padding-right="{@value}"> </fo:inline>
3877
3888
  </xsl:template><xsl:template match="*[local-name()='sup']">
3878
3889
  <fo:inline font-size="80%" vertical-align="super">
3879
3890
  <xsl:apply-templates/>
@@ -4366,6 +4377,16 @@
4366
4377
  <mathml:mspace width="0.5ex"/>
4367
4378
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
4368
4379
  <xsl:variable name="target">
4380
+ <xsl:choose>
4381
+ <xsl:when test="@updatetype = 'true'">
4382
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
4383
+ </xsl:when>
4384
+ <xsl:otherwise>
4385
+ <xsl:value-of select="normalize-space(@target)"/>
4386
+ </xsl:otherwise>
4387
+ </xsl:choose>
4388
+ </xsl:variable>
4389
+ <xsl:variable name="target_text">
4369
4390
  <xsl:choose>
4370
4391
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
4371
4392
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -4378,19 +4399,19 @@
4378
4399
  <fo:inline xsl:use-attribute-sets="link-style">
4379
4400
 
4380
4401
  <xsl:choose>
4381
- <xsl:when test="$target = ''">
4402
+ <xsl:when test="$target_text = ''">
4382
4403
  <xsl:apply-templates/>
4383
4404
  </xsl:when>
4384
4405
  <xsl:otherwise>
4385
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
4406
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
4386
4407
  <xsl:choose>
4387
4408
  <xsl:when test="normalize-space(.) = ''">
4388
- <!-- <xsl:value-of select="$target"/> -->
4389
4409
  <xsl:call-template name="add-zero-spaces-link-java">
4390
- <xsl:with-param name="text" select="$target"/>
4410
+ <xsl:with-param name="text" select="$target_text"/>
4391
4411
  </xsl:call-template>
4392
4412
  </xsl:when>
4393
4413
  <xsl:otherwise>
4414
+ <!-- output text from <link>text</link> -->
4394
4415
  <xsl:apply-templates/>
4395
4416
  </xsl:otherwise>
4396
4417
  </xsl:choose>
@@ -4972,6 +4993,7 @@
4972
4993
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
4973
4994
 
4974
4995
  <fo:block-container margin-left="0mm">
4996
+ <xsl:copy-of select="@id"/>
4975
4997
  <xsl:if test="parent::*[local-name() = 'note']">
4976
4998
  <xsl:attribute name="margin-left">
4977
4999
  <xsl:choose>
@@ -5249,6 +5271,7 @@
5249
5271
  </xsl:template><xsl:template match="*[local-name() = 'example']">
5250
5272
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
5251
5273
 
5274
+
5252
5275
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5253
5276
 
5254
5277
  <xsl:variable name="element">
@@ -5458,6 +5481,7 @@
5458
5481
 
5459
5482
 
5460
5483
 
5484
+
5461
5485
  <xsl:choose>
5462
5486
  <xsl:when test="$depth = 5">7</xsl:when>
5463
5487
  <xsl:when test="$depth = 4">10</xsl:when>
@@ -6153,6 +6177,9 @@
6153
6177
  <xsl:when test="parent::*[local-name() = 'preface']">
6154
6178
  <xsl:value-of select="$level_total - 1"/>
6155
6179
  </xsl:when>
6180
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
6181
+ <xsl:value-of select="$level_total - 1"/>
6182
+ </xsl:when>
6156
6183
  <xsl:when test="ancestor::*[local-name() = 'preface']">
6157
6184
  <xsl:value-of select="$level_total - 2"/>
6158
6185
  </xsl:when>
@@ -6293,7 +6320,14 @@
6293
6320
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
6294
6321
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
6295
6322
  </xsl:when>
6296
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
6323
+ <xsl:otherwise>
6324
+ <xsl:variable name="key_">
6325
+ <xsl:call-template name="capitalize">
6326
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
6327
+ </xsl:call-template>
6328
+ </xsl:variable>
6329
+ <xsl:value-of select="$key_"/>
6330
+ </xsl:otherwise>
6297
6331
  </xsl:choose>
6298
6332
 
6299
6333
  </xsl:template><xsl:template name="setTrackChangesStyles">