metanorma-ribose 1.6.6 → 1.6.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1336d588649f37107c8c9a66f4401e7c944efb208de7bd607e87bd1a4a7167ec
4
- data.tar.gz: f00a115cb78b6388742d34ed27480058a1220f35a308aaa32de9ab40620b168b
3
+ metadata.gz: 97a94c2010abcd7cd4510388d3f92f1cc1f9c75f948d14360c7d85ea59700a67
4
+ data.tar.gz: 97c8dca76e04be80e3f8f8516494ccee946ece71e64c45b80b3c550d3f066ce1
5
5
  SHA512:
6
- metadata.gz: fc83e3e0763b7f8b3bd2a3e2c42d28827608fbad3d850ffe87aed038f9c99afd4df254f9f0a0a517d03774f7b6ed7c8858b3262e2ed231848ca348fe7e61ee34
7
- data.tar.gz: c9c1fb127ae4274a8e3664f308304a679deff458af6af6f8da67cb06f300fb64ae958e347209e34220930791bbd0c4157894bc6073cd066a756e246b326971db
6
+ metadata.gz: 53555a7d36d54ae64d42d9040b883cee399c74bfe5c74aa520f0dc8ef9e932bfacfdee420e27e3b32babf975e43742284b0a7a25615afd730fad1e2052d3b933
7
+ data.tar.gz: e635ecbb20175f49919a9aaae04bf6f80823af1ee37eb5010f4798ea9554ce2171f05ad4a2eef0b16a68d9cd8ed8e3acd535800ca4a2f3a2d7fc2b86b57d4946
@@ -4,7 +4,8 @@ name: rake
4
4
 
5
5
  on:
6
6
  push:
7
- branches: [ master ]
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
8
9
  pull_request:
9
10
 
10
11
  jobs:
@@ -31,32 +32,35 @@ jobs:
31
32
  steps:
32
33
  - uses: actions/checkout@master
33
34
 
34
- - name: Use Ruby
35
- uses: ruby/setup-ruby@v1
35
+ - uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
- bundler-cache: true
39
38
 
40
- - name: Update gems
41
- run: bundle install --jobs 4 --retry 3
39
+ - uses: actions/cache@v1
40
+ with:
41
+ path: vendor/bundle
42
+ key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
43
+ restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
44
+
45
+ - run: bundle config set path 'vendor/bundle'
46
+
47
+ - run: bundle install --jobs 4 --retry 3
42
48
 
43
- - name: Install PlantUML Ubuntu
49
+ - name: install plantuml ubuntu
44
50
  if: matrix.os == 'ubuntu-latest'
45
51
  uses: nick-invision/retry@v1
46
52
  with:
47
53
  polling_interval_seconds: 5
48
54
  timeout_minutes: 5
49
55
  max_attempts: 3
50
- command: sudo apt-get update -y && sudo bash -c "curl -L https://github.com/metanorma/plantuml-install/raw/master/ubuntu.sh | bash"
56
+ command: >
57
+ sudo apt-get update -y && sudo bash -c
58
+ "curl -L https://github.com/metanorma/plantuml-install/raw/master/ubuntu.sh | bash"
51
59
 
52
- - name: Install PlantUML macOS
53
- if: matrix.os == 'macos-latest'
60
+ - if: matrix.os == 'macos-latest'
54
61
  run: brew install plantuml
55
62
 
56
- - name: Install PlantUML Windows
57
- if: matrix.os == 'windows-latest'
58
- run: |
59
- cinst -y plantuml
63
+ - if: matrix.os == 'windows-latest'
64
+ run: cinst -y plantuml
60
65
 
61
- - name: Run specs
62
- run: bundle exec rake
66
+ - run: bundle exec rake
@@ -1,18 +1,14 @@
1
1
  = metanorma-ribose: Asciidoctor processor for Ribose Standard Documents
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-rsd.svg["Gem Version", link="https://rubygems.org/gems/metanorma-rsd"]
4
- image:https://github.com/metanorma/metanorma-rsd/workflows/macos/badge.svg["Build Status (macOS)", link="https://github.com/metanorma/metanorma-rsd/actions?workflow=macos"]
5
- image:https://github.com/metanorma/metanorma-rsd/workflows/ubuntu/badge.svg["Build Status (ubuntu)", link="https://github.com/metanorma/metanorma-rsd/actions?workflow=ubuntu"]
6
- image:https://github.com/metanorma/metanorma-rsd/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-rsd/actions?workflow=windows"]
4
+ image:https://github.com/metanorma/metanorma-rsd/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-rsd/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/metanorma-rsd/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-rsd"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-rsd.svg["Pull Requests", link="https://github.com/metanorma/metanorma-rsd/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/metanorma-rsd/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-rsd/releases"]
10
8
 
11
- _Formerly known as_ `asciidoctor-rsd`, `metanorma-rsd`.
12
-
13
9
  == Functionality
14
10
 
15
- This gem processes http://asciidoctor.org/[Asciidoctor] documents following
11
+ This gem processes https://www.metanorma.com[Metanorma documents] following
16
12
  the Metanorma model for generating Ribose standards.
17
13
 
18
14
  The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
@@ -69,3 +65,6 @@ repository.
69
65
  Example documents may be found in the https://github.com/metanorma/mn-samples-ribose[mn-samples-ribose]
70
66
  repository.
71
67
 
68
+ == Notes
69
+
70
+ Metanorma-Ribose was formerly published as `asciidoctor-rsd`, `metanorma-rsd`.
@@ -24,6 +24,14 @@
24
24
  <start>
25
25
  <ref name="standard-document"/>
26
26
  </start>
27
+ <define name="doctype">
28
+ <element name="doctype">
29
+ <optional>
30
+ <attribute name="abbreviation"/>
31
+ </optional>
32
+ <ref name="DocumentType"/>
33
+ </element>
34
+ </define>
27
35
  <define name="hyperlink">
28
36
  <element name="link">
29
37
  <attribute name="target">
@@ -141,6 +149,11 @@
141
149
  <data type="boolean"/>
142
150
  </attribute>
143
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
144
157
  <oneOrMore>
145
158
  <ref name="dt"/>
146
159
  <ref name="dd"/>
@@ -950,13 +950,22 @@
950
950
  <title-part lang="en">
951
951
 
952
952
 
953
+
953
954
  </title-part>
954
955
  <title-part lang="fr">
955
956
 
956
957
 
958
+
957
959
  </title-part>
958
960
  <title-part lang="zh">第 # 部分:</title-part>
959
961
 
962
+ <title-subpart lang="en">
963
+
964
+ </title-subpart>
965
+ <title-subpart lang="fr">
966
+
967
+ </title-subpart>
968
+
960
969
  <title-modified lang="en">modified</title-modified>
961
970
  <title-modified lang="fr">modifiée</title-modified>
962
971
 
@@ -1441,7 +1450,9 @@
1441
1450
 
1442
1451
 
1443
1452
 
1444
-
1453
+ <!-- <xsl:if test="$namespace = 'bipm'">
1454
+ <fo:block>&#xA0;</fo:block>
1455
+ </xsl:if> -->
1445
1456
 
1446
1457
  <!-- $namespace = 'iso' or -->
1447
1458
 
@@ -1602,6 +1613,7 @@
1602
1613
  <xsl:if test="normalize-space() != ''">
1603
1614
  <fo:block xsl:use-attribute-sets="table-name-style">
1604
1615
 
1616
+
1605
1617
  <xsl:apply-templates/>
1606
1618
  </fo:block>
1607
1619
  </xsl:if>
@@ -1955,6 +1967,7 @@
1955
1967
 
1956
1968
 
1957
1969
 
1970
+
1958
1971
  <!-- <xsl:if test="$namespace = 'bipm'">
1959
1972
  <xsl:attribute name="height">8mm</xsl:attribute>
1960
1973
  </xsl:if> -->
@@ -2040,7 +2053,8 @@
2040
2053
  </xsl:attribute>
2041
2054
  </xsl:if>
2042
2055
  <xsl:call-template name="display-align"/>
2043
- <fo:block>
2056
+ <fo:block>
2057
+
2044
2058
  <xsl:apply-templates/>
2045
2059
  </fo:block>
2046
2060
  </fo:table-cell>
@@ -2250,7 +2264,11 @@
2250
2264
  <xsl:apply-templates/>
2251
2265
  </fo:inline>
2252
2266
  </xsl:template><xsl:template match="*[local-name()='dl']">
2253
- <fo:block-container margin-left="0mm">
2267
+ <fo:block-container>
2268
+
2269
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2270
+
2271
+
2254
2272
  <xsl:if test="parent::*[local-name() = 'note']">
2255
2273
  <xsl:attribute name="margin-left">
2256
2274
  <xsl:choose>
@@ -2260,8 +2278,11 @@
2260
2278
  </xsl:attribute>
2261
2279
 
2262
2280
  </xsl:if>
2263
- <fo:block-container margin-left="0mm">
2264
-
2281
+ <fo:block-container>
2282
+
2283
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2284
+
2285
+
2265
2286
  <xsl:variable name="parent" select="local-name(..)"/>
2266
2287
 
2267
2288
  <xsl:variable name="key_iso">
@@ -2275,9 +2296,12 @@
2275
2296
  <fo:block margin-bottom="12pt" text-align="left">
2276
2297
 
2277
2298
  <xsl:variable name="title-where">
2278
- <xsl:call-template name="getTitle">
2279
- <xsl:with-param name="name" select="'title-where'"/>
2280
- </xsl:call-template>
2299
+
2300
+
2301
+ <xsl:call-template name="getTitle">
2302
+ <xsl:with-param name="name" select="'title-where'"/>
2303
+ </xsl:call-template>
2304
+
2281
2305
  </xsl:variable>
2282
2306
  <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2283
2307
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
@@ -2293,9 +2317,12 @@
2293
2317
 
2294
2318
 
2295
2319
  <xsl:variable name="title-where">
2296
- <xsl:call-template name="getTitle">
2297
- <xsl:with-param name="name" select="'title-where'"/>
2298
- </xsl:call-template>
2320
+
2321
+
2322
+ <xsl:call-template name="getTitle">
2323
+ <xsl:with-param name="name" select="'title-where'"/>
2324
+ </xsl:call-template>
2325
+
2299
2326
  </xsl:variable>
2300
2327
  <xsl:value-of select="$title-where"/>
2301
2328
  </fo:block>
@@ -2306,9 +2333,12 @@
2306
2333
 
2307
2334
 
2308
2335
  <xsl:variable name="title-key">
2309
- <xsl:call-template name="getTitle">
2310
- <xsl:with-param name="name" select="'title-key'"/>
2311
- </xsl:call-template>
2336
+
2337
+
2338
+ <xsl:call-template name="getTitle">
2339
+ <xsl:with-param name="name" select="'title-key'"/>
2340
+ </xsl:call-template>
2341
+
2312
2342
  </xsl:variable>
2313
2343
  <xsl:value-of select="$title-key"/>
2314
2344
  </fo:block>
@@ -2879,7 +2909,18 @@
2879
2909
  <xsl:with-param name="previousRow" select="$newRow"/>
2880
2910
  </xsl:apply-templates>
2881
2911
  </xsl:template><xsl:template name="getLang">
2882
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2912
+ <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
2913
+ <xsl:variable name="language">
2914
+ <xsl:choose>
2915
+ <xsl:when test="$language_current != ''">
2916
+ <xsl:value-of select="$language_current"/>
2917
+ </xsl:when>
2918
+ <xsl:otherwise>
2919
+ <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2920
+ </xsl:otherwise>
2921
+ </xsl:choose>
2922
+ </xsl:variable>
2923
+
2883
2924
  <xsl:choose>
2884
2925
  <xsl:when test="$language = 'English'">en</xsl:when>
2885
2926
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
@@ -2914,6 +2955,7 @@
2914
2955
  <xsl:value-of select="substring($str, 2)"/>
2915
2956
  </xsl:template><xsl:template match="mathml:math">
2916
2957
  <fo:inline font-family="STIX Two Math"> <!-- -->
2958
+
2917
2959
  <xsl:variable name="mathml">
2918
2960
  <xsl:apply-templates select="." mode="mathml"/>
2919
2961
  </xsl:variable>
@@ -2996,10 +3038,14 @@
2996
3038
  </fo:inline>
2997
3039
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
2998
3040
  <xsl:variable name="title-modified">
2999
- <xsl:call-template name="getTitle">
3000
- <xsl:with-param name="name" select="'title-modified'"/>
3001
- </xsl:call-template>
3041
+
3042
+
3043
+ <xsl:call-template name="getTitle">
3044
+ <xsl:with-param name="name" select="'title-modified'"/>
3045
+ </xsl:call-template>
3046
+
3002
3047
  </xsl:variable>
3048
+
3003
3049
  <xsl:choose>
3004
3050
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
3005
3051
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
@@ -3732,9 +3778,14 @@
3732
3778
 
3733
3779
  <fo:inline>
3734
3780
 
3735
- <xsl:call-template name="getTitle">
3736
- <xsl:with-param name="name" select="'title-source'"/>
3737
- </xsl:call-template>
3781
+
3782
+
3783
+
3784
+ <xsl:call-template name="getTitle">
3785
+ <xsl:with-param name="name" select="'title-source'"/>
3786
+ </xsl:call-template>
3787
+
3788
+
3738
3789
  <xsl:text>: </xsl:text>
3739
3790
  </fo:inline>
3740
3791
 
@@ -3878,9 +3929,12 @@
3878
3929
  </fo:block>
3879
3930
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3880
3931
  <xsl:variable name="title-deprecated">
3881
- <xsl:call-template name="getTitle">
3882
- <xsl:with-param name="name" select="'title-deprecated'"/>
3883
- </xsl:call-template>
3932
+
3933
+
3934
+ <xsl:call-template name="getTitle">
3935
+ <xsl:with-param name="name" select="'title-deprecated'"/>
3936
+ </xsl:call-template>
3937
+
3884
3938
  </xsl:variable>
3885
3939
  <fo:block xsl:use-attribute-sets="deprecates-style">
3886
3940
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -4246,13 +4300,22 @@
4246
4300
  </xsl:template><xsl:template name="split">
4247
4301
  <xsl:param name="pText" select="."/>
4248
4302
  <xsl:param name="sep" select="','"/>
4303
+ <xsl:param name="normalize-space" select="'true'"/>
4249
4304
  <xsl:if test="string-length($pText) &gt;0">
4250
4305
  <item>
4251
- <xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
4306
+ <xsl:choose>
4307
+ <xsl:when test="$normalize-space = 'true'">
4308
+ <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
4309
+ </xsl:when>
4310
+ <xsl:otherwise>
4311
+ <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
4312
+ </xsl:otherwise>
4313
+ </xsl:choose>
4252
4314
  </item>
4253
4315
  <xsl:call-template name="split">
4254
4316
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
4255
4317
  <xsl:with-param name="sep" select="$sep"/>
4318
+ <xsl:with-param name="normalize-space" select="$normalize-space"/>
4256
4319
  </xsl:call-template>
4257
4320
  </xsl:if>
4258
4321
  </xsl:template><xsl:template name="getDocumentId">
@@ -4318,4 +4381,23 @@
4318
4381
  <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4319
4382
  </xsl:call-template>
4320
4383
  </xsl:if>
4384
+ </xsl:template><xsl:template name="repeat">
4385
+ <xsl:param name="char" select="'*'"/>
4386
+ <xsl:param name="count"/>
4387
+ <xsl:if test="$count &gt; 0">
4388
+ <xsl:value-of select="$char"/>
4389
+ <xsl:call-template name="repeat">
4390
+ <xsl:with-param name="char" select="$char"/>
4391
+ <xsl:with-param name="count" select="$count - 1"/>
4392
+ </xsl:call-template>
4393
+ </xsl:if>
4394
+ </xsl:template><xsl:template name="getLocalizedString">
4395
+ <xsl:param name="key"/>
4396
+
4397
+ <xsl:variable name="curr_lang">
4398
+ <xsl:call-template name="getLang"/>
4399
+ </xsl:variable>
4400
+
4401
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4402
+
4321
4403
  </xsl:template></xsl:stylesheet>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "1.6.6"
3
+ VERSION = "1.6.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.6
4
+ version: 1.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-25 00:00:00.000000000 Z
11
+ date: 2020-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc