metanorma-m3aawg 1.7.3 → 1.7.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: fdbb2f2eecda7549e307a465831998882079ebe7ed26100790809a89bd7952a9
4
- data.tar.gz: 9f96d2ad4b74b4a953d908690b1b307c5c9f0994514d98a2bd5b84e992f43f5c
3
+ metadata.gz: 689a0873051d63e1493f87fcb336e78624fa2fb478c709a6e3973eaeee3cff90
4
+ data.tar.gz: ea913e23f8d07a3f1f295b0d2b05540c1de3c910e3e46aad496d44f0f470e9db
5
5
  SHA512:
6
- metadata.gz: 8f5a64a375bea2db893b472e54a9792ed5408dfd337e043620a573f02159ddd5776cbeadd58838f0aed5423da83c0f302a0bf6b31c8724f95376a36e7b98db57
7
- data.tar.gz: 8b5989657e3ab1b26ddb504c55099bea13af39046060a37b9aa5ff036dddd4c29c3fae5f37c001d96b01c0ba6d65d86a85f2d6373cf7773b73c05690a912e4e6
6
+ metadata.gz: 5ccbb0d129f1b4571e2355044df989d71ed11817f97eb9f825460421a5581440c5d525207d9333d09d24e3bd03dec78cf16b78ac5de1f6d74682b740dad06a3a
7
+ data.tar.gz: cd768f7ec80f3223c69c200bf4f806f03dda1e954a1989f036e2f4b7168f2ee505a6231636ca42024c5eb3253a1a2d6740b7eb7f492a4df7a88adee5182262e8
@@ -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>
@@ -1058,6 +1058,7 @@
1058
1058
 
1059
1059
 
1060
1060
 
1061
+
1061
1062
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1062
1063
  <xsl:attribute name="white-space">pre</xsl:attribute>
1063
1064
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1122,6 +1123,7 @@
1122
1123
 
1123
1124
 
1124
1125
 
1126
+
1125
1127
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1126
1128
 
1127
1129
 
@@ -1141,9 +1143,7 @@
1141
1143
 
1142
1144
 
1143
1145
 
1144
-
1145
-
1146
-
1146
+
1147
1147
 
1148
1148
 
1149
1149
 
@@ -1193,6 +1193,7 @@
1193
1193
 
1194
1194
 
1195
1195
 
1196
+
1196
1197
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1197
1198
 
1198
1199
  <xsl:attribute name="font-size">12pt</xsl:attribute>
@@ -1215,11 +1216,13 @@
1215
1216
 
1216
1217
 
1217
1218
 
1219
+
1218
1220
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1219
1221
 
1220
1222
 
1221
1223
 
1222
1224
 
1225
+
1223
1226
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1224
1227
 
1225
1228
 
@@ -1311,10 +1314,12 @@
1311
1314
 
1312
1315
 
1313
1316
 
1317
+
1314
1318
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1315
1319
 
1316
1320
 
1317
1321
 
1322
+
1318
1323
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1319
1324
 
1320
1325
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1384,8 +1389,10 @@
1384
1389
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1385
1390
 
1386
1391
 
1392
+
1387
1393
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1388
1394
 
1395
+
1389
1396
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1390
1397
 
1391
1398
 
@@ -2133,6 +2140,7 @@
2133
2140
 
2134
2141
 
2135
2142
 
2143
+
2136
2144
  <xsl:if test="$lang = 'ar'">
2137
2145
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2138
2146
  </xsl:if>
@@ -2494,6 +2502,7 @@
2494
2502
 
2495
2503
 
2496
2504
 
2505
+
2497
2506
  <xsl:variable name="title-key">
2498
2507
 
2499
2508
 
@@ -2775,6 +2784,8 @@
2775
2784
 
2776
2785
  <xsl:apply-templates/>
2777
2786
  </fo:inline>
2787
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2788
+ <fo:inline padding-right="{@value}"> </fo:inline>
2778
2789
  </xsl:template><xsl:template match="*[local-name()='sup']">
2779
2790
  <fo:inline font-size="80%" vertical-align="super">
2780
2791
  <xsl:apply-templates/>
@@ -3272,6 +3283,16 @@
3272
3283
  <mathml:mspace width="0.5ex"/>
3273
3284
  </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">
3274
3285
  <xsl:variable name="target">
3286
+ <xsl:choose>
3287
+ <xsl:when test="@updatetype = 'true'">
3288
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3289
+ </xsl:when>
3290
+ <xsl:otherwise>
3291
+ <xsl:value-of select="normalize-space(@target)"/>
3292
+ </xsl:otherwise>
3293
+ </xsl:choose>
3294
+ </xsl:variable>
3295
+ <xsl:variable name="target_text">
3275
3296
  <xsl:choose>
3276
3297
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3277
3298
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3284,19 +3305,19 @@
3284
3305
  <fo:inline xsl:use-attribute-sets="link-style">
3285
3306
 
3286
3307
  <xsl:choose>
3287
- <xsl:when test="$target = ''">
3308
+ <xsl:when test="$target_text = ''">
3288
3309
  <xsl:apply-templates/>
3289
3310
  </xsl:when>
3290
3311
  <xsl:otherwise>
3291
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3312
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3292
3313
  <xsl:choose>
3293
3314
  <xsl:when test="normalize-space(.) = ''">
3294
- <!-- <xsl:value-of select="$target"/> -->
3295
3315
  <xsl:call-template name="add-zero-spaces-link-java">
3296
- <xsl:with-param name="text" select="$target"/>
3316
+ <xsl:with-param name="text" select="$target_text"/>
3297
3317
  </xsl:call-template>
3298
3318
  </xsl:when>
3299
3319
  <xsl:otherwise>
3320
+ <!-- output text from <link>text</link> -->
3300
3321
  <xsl:apply-templates/>
3301
3322
  </xsl:otherwise>
3302
3323
  </xsl:choose>
@@ -3876,6 +3897,7 @@
3876
3897
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3877
3898
 
3878
3899
  <fo:block-container margin-left="0mm">
3900
+ <xsl:copy-of select="@id"/>
3879
3901
  <xsl:if test="parent::*[local-name() = 'note']">
3880
3902
  <xsl:attribute name="margin-left">
3881
3903
  <xsl:choose>
@@ -4153,6 +4175,7 @@
4153
4175
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4154
4176
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4155
4177
 
4178
+
4156
4179
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4157
4180
 
4158
4181
  <xsl:variable name="element">
@@ -4362,6 +4385,7 @@
4362
4385
 
4363
4386
 
4364
4387
 
4388
+
4365
4389
 
4366
4390
  <xsl:variable name="references_num_current">
4367
4391
  <xsl:number level="any" count="m3d:references"/>
@@ -5053,6 +5077,9 @@
5053
5077
  <xsl:when test="parent::*[local-name() = 'preface']">
5054
5078
  <xsl:value-of select="$level_total - 1"/>
5055
5079
  </xsl:when>
5080
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
5081
+ <xsl:value-of select="$level_total - 1"/>
5082
+ </xsl:when>
5056
5083
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5057
5084
  <xsl:value-of select="$level_total - 2"/>
5058
5085
  </xsl:when>
@@ -5193,7 +5220,14 @@
5193
5220
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5194
5221
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5195
5222
  </xsl:when>
5196
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5223
+ <xsl:otherwise>
5224
+ <xsl:variable name="key_">
5225
+ <xsl:call-template name="capitalize">
5226
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5227
+ </xsl:call-template>
5228
+ </xsl:variable>
5229
+ <xsl:value-of select="$key_"/>
5230
+ </xsl:otherwise>
5197
5231
  </xsl:choose>
5198
5232
 
5199
5233
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -1058,6 +1058,7 @@
1058
1058
 
1059
1059
 
1060
1060
 
1061
+
1061
1062
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1062
1063
  <xsl:attribute name="white-space">pre</xsl:attribute>
1063
1064
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1122,6 +1123,7 @@
1122
1123
 
1123
1124
 
1124
1125
 
1126
+
1125
1127
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1126
1128
 
1127
1129
 
@@ -1141,9 +1143,7 @@
1141
1143
 
1142
1144
 
1143
1145
 
1144
-
1145
-
1146
-
1146
+
1147
1147
 
1148
1148
 
1149
1149
 
@@ -1193,6 +1193,7 @@
1193
1193
 
1194
1194
 
1195
1195
 
1196
+
1196
1197
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1197
1198
 
1198
1199
  <xsl:attribute name="font-size">12pt</xsl:attribute>
@@ -1215,11 +1216,13 @@
1215
1216
 
1216
1217
 
1217
1218
 
1219
+
1218
1220
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1219
1221
 
1220
1222
 
1221
1223
 
1222
1224
 
1225
+
1223
1226
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1224
1227
 
1225
1228
 
@@ -1311,10 +1314,12 @@
1311
1314
 
1312
1315
 
1313
1316
 
1317
+
1314
1318
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1315
1319
 
1316
1320
 
1317
1321
 
1322
+
1318
1323
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1319
1324
 
1320
1325
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1384,8 +1389,10 @@
1384
1389
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1385
1390
 
1386
1391
 
1392
+
1387
1393
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1388
1394
 
1395
+
1389
1396
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1390
1397
 
1391
1398
 
@@ -2133,6 +2140,7 @@
2133
2140
 
2134
2141
 
2135
2142
 
2143
+
2136
2144
  <xsl:if test="$lang = 'ar'">
2137
2145
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2138
2146
  </xsl:if>
@@ -2494,6 +2502,7 @@
2494
2502
 
2495
2503
 
2496
2504
 
2505
+
2497
2506
  <xsl:variable name="title-key">
2498
2507
 
2499
2508
 
@@ -2775,6 +2784,8 @@
2775
2784
 
2776
2785
  <xsl:apply-templates/>
2777
2786
  </fo:inline>
2787
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2788
+ <fo:inline padding-right="{@value}"> </fo:inline>
2778
2789
  </xsl:template><xsl:template match="*[local-name()='sup']">
2779
2790
  <fo:inline font-size="80%" vertical-align="super">
2780
2791
  <xsl:apply-templates/>
@@ -3272,6 +3283,16 @@
3272
3283
  <mathml:mspace width="0.5ex"/>
3273
3284
  </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">
3274
3285
  <xsl:variable name="target">
3286
+ <xsl:choose>
3287
+ <xsl:when test="@updatetype = 'true'">
3288
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3289
+ </xsl:when>
3290
+ <xsl:otherwise>
3291
+ <xsl:value-of select="normalize-space(@target)"/>
3292
+ </xsl:otherwise>
3293
+ </xsl:choose>
3294
+ </xsl:variable>
3295
+ <xsl:variable name="target_text">
3275
3296
  <xsl:choose>
3276
3297
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3277
3298
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3284,19 +3305,19 @@
3284
3305
  <fo:inline xsl:use-attribute-sets="link-style">
3285
3306
 
3286
3307
  <xsl:choose>
3287
- <xsl:when test="$target = ''">
3308
+ <xsl:when test="$target_text = ''">
3288
3309
  <xsl:apply-templates/>
3289
3310
  </xsl:when>
3290
3311
  <xsl:otherwise>
3291
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3312
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3292
3313
  <xsl:choose>
3293
3314
  <xsl:when test="normalize-space(.) = ''">
3294
- <!-- <xsl:value-of select="$target"/> -->
3295
3315
  <xsl:call-template name="add-zero-spaces-link-java">
3296
- <xsl:with-param name="text" select="$target"/>
3316
+ <xsl:with-param name="text" select="$target_text"/>
3297
3317
  </xsl:call-template>
3298
3318
  </xsl:when>
3299
3319
  <xsl:otherwise>
3320
+ <!-- output text from <link>text</link> -->
3300
3321
  <xsl:apply-templates/>
3301
3322
  </xsl:otherwise>
3302
3323
  </xsl:choose>
@@ -3876,6 +3897,7 @@
3876
3897
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3877
3898
 
3878
3899
  <fo:block-container margin-left="0mm">
3900
+ <xsl:copy-of select="@id"/>
3879
3901
  <xsl:if test="parent::*[local-name() = 'note']">
3880
3902
  <xsl:attribute name="margin-left">
3881
3903
  <xsl:choose>
@@ -4153,6 +4175,7 @@
4153
4175
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4154
4176
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4155
4177
 
4178
+
4156
4179
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4157
4180
 
4158
4181
  <xsl:variable name="element">
@@ -4362,6 +4385,7 @@
4362
4385
 
4363
4386
 
4364
4387
 
4388
+
4365
4389
 
4366
4390
  <xsl:variable name="references_num_current">
4367
4391
  <xsl:number level="any" count="m3d:references"/>
@@ -5053,6 +5077,9 @@
5053
5077
  <xsl:when test="parent::*[local-name() = 'preface']">
5054
5078
  <xsl:value-of select="$level_total - 1"/>
5055
5079
  </xsl:when>
5080
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
5081
+ <xsl:value-of select="$level_total - 1"/>
5082
+ </xsl:when>
5056
5083
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5057
5084
  <xsl:value-of select="$level_total - 2"/>
5058
5085
  </xsl:when>
@@ -5193,7 +5220,14 @@
5193
5220
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5194
5221
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5195
5222
  </xsl:when>
5196
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5223
+ <xsl:otherwise>
5224
+ <xsl:variable name="key_">
5225
+ <xsl:call-template name="capitalize">
5226
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5227
+ </xsl:call-template>
5228
+ </xsl:variable>
5229
+ <xsl:value-of select="$key_"/>
5230
+ </xsl:otherwise>
5197
5231
  </xsl:choose>
5198
5232
 
5199
5233
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3AAWG
3
- VERSION = "1.7.3".freeze
3
+ VERSION = "1.7.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: 1.7.3
4
+ version: 1.7.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: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities