metanorma-ietf 2.0.10 → 2.0.11

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: 34f8f459bca71354029fcdb983ddeb9b1c8bb3fd5b52f572ffb75eb44737084e
4
- data.tar.gz: e8aae00550c5396d0ef89d966ce839773309fb53fbc434a0563ea1f731d58ba6
3
+ metadata.gz: 0cdde2dd756f4b98e9e1ad918916b0fc983ced8c3917f5c365394d03b2e5510b
4
+ data.tar.gz: d53d5c9fadfd23fa1d9f5c400c66ecc003643e519937063180cd9574daa5cd76
5
5
  SHA512:
6
- metadata.gz: d271471a6b69fe0b966dbc406cab8a619034f76bec5c72c83565df42cfbe5986b597d78fc6d9409088b7556730996248f6b0f45e43b1a17c4bc688a7ef6f3222
7
- data.tar.gz: 21e98859f1a179b305c7c87d0d98150844cc34b2b282df04223c95befd7675c541e38f9a3225324e33e63ea39a4888b26d3be1ec787f425f2b766acb5beb699f
6
+ metadata.gz: 76de6e92a10f1a8789557d2543eda42acda12f0002e48738a7b38502eb21ec7e3927aa2a2acbc536ac5b2353ce62b32817b30ca0588c880bf72a8248c7df8076
7
+ data.tar.gz: 4141c256ce2b15729296f48852d42a8b0194f58b83978bb1cb2c72c2c04613ed07a9c6d1346999e96e86a99ba120ef029b85b62ae4c8e268bbadf5bd022c9afe
@@ -6,15 +6,23 @@ on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
+ paths-ignore:
10
+ - .github/workflows/ubuntu.yml
11
+ - .github/workflows/windows.yml
9
12
 
10
13
  jobs:
11
14
  test-macos:
12
15
  name: Test on Ruby ${{ matrix.ruby }} macOS
13
16
  runs-on: macos-latest
17
+ continue-on-error: ${{ matrix.experimental }}
14
18
  strategy:
15
19
  fail-fast: false
16
20
  matrix:
17
21
  ruby: [ '2.6', '2.5', '2.4' ]
22
+ experimental: [false]
23
+ include:
24
+ - ruby: '2.7'
25
+ experimental: true
18
26
  steps:
19
27
  - uses: actions/checkout@master
20
28
  - name: Cache xml2rfc
@@ -6,15 +6,22 @@ on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
-
9
+ paths-ignore:
10
+ - .github/workflows/macos.yml
11
+ - .github/workflows/windows.yml
10
12
  jobs:
11
13
  test-linux:
12
14
  name: Test on Ruby ${{ matrix.ruby }} Ubuntu
13
15
  runs-on: ubuntu-latest
16
+ continue-on-error: ${{ matrix.experimental }}
14
17
  strategy:
15
18
  fail-fast: false
16
19
  matrix:
17
20
  ruby: [ '2.6', '2.5', '2.4' ]
21
+ experimental: [false]
22
+ include:
23
+ - ruby: '2.7'
24
+ experimental: true
18
25
  steps:
19
26
  - uses: actions/checkout@master
20
27
  - name: Cache xml2rfc
@@ -6,15 +6,23 @@ on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
+ paths-ignore:
10
+ - .github/workflows/macos.yml
11
+ - .github/workflows/ubuntu.yml
9
12
 
10
13
  jobs:
11
14
  test-windows:
12
15
  name: Test on Ruby ${{ matrix.ruby }} Windows
13
16
  runs-on: windows-latest
17
+ continue-on-error: ${{ matrix.experimental }}
14
18
  strategy:
15
19
  fail-fast: false
16
20
  matrix:
17
21
  ruby: [ '2.6', '2.5', '2.4' ]
22
+ experimental: [false]
23
+ include:
24
+ - ruby: '2.7'
25
+ experimental: true
18
26
  steps:
19
27
  - uses: actions/checkout@master
20
28
  - name: Cache xml2rfc
@@ -88,7 +88,7 @@
88
88
  <text/>
89
89
  </element>
90
90
  </define>
91
- <define name="LocalizedString">
91
+ <define name="LocalizedString1">
92
92
  <optional>
93
93
  <!-- multiple languages and scripts possible: comma delimit them if so -->
94
94
  <attribute name="language"/>
@@ -98,6 +98,16 @@
98
98
  </optional>
99
99
  <text/>
100
100
  </define>
101
+ <define name="LocalizedString">
102
+ <choice>
103
+ <ref name="LocalizedString1"/>
104
+ <oneOrMore>
105
+ <element name="variant">
106
+ <ref name="LocalizedString1"/>
107
+ </element>
108
+ </oneOrMore>
109
+ </choice>
110
+ </define>
101
111
  <!--
102
112
  Unlike UML, change type to format: type is overloaded
103
113
  Would be need if plain were default value and could omit the attribute
@@ -121,7 +131,7 @@
121
131
  </optional>
122
132
  <ref name="LocalizedStringOrXsAny"/>
123
133
  </define>
124
- <define name="LocalizedStringOrXsAny">
134
+ <define name="LocalizedStringOrXsAny1">
125
135
  <optional>
126
136
  <!-- multiple languages and scripts possible: comma delimit them if so -->
127
137
  <attribute name="language"/>
@@ -136,6 +146,16 @@
136
146
  </choice>
137
147
  </oneOrMore>
138
148
  </define>
149
+ <define name="LocalizedStringOrXsAny">
150
+ <choice>
151
+ <ref name="LocalizedStringOrXsAny1"/>
152
+ <oneOrMore>
153
+ <element name="variant">
154
+ <ref name="LocalizedStringOrXsAny1"/>
155
+ </element>
156
+ </oneOrMore>
157
+ </choice>
158
+ </define>
139
159
  <define name="contributor">
140
160
  <element name="contributor">
141
161
  <zeroOrMore>
@@ -50,8 +50,9 @@ module IsoDoc::Ietf
50
50
  r.format nil, **attr_code(target: u.text, type: u["type"])
51
51
  end
52
52
  docidentifiers = b.xpath(ns("./docidentifier"))
53
- id = bibitem_ref_code(b) and id.text != "(NO ID)" and
54
- r.refcontent render_identifier(id)
53
+ id = render_identifier(bibitem_ref_code(b))
54
+ !id[1].nil? and id[1] != "(NO ID)" and
55
+ r.refcontent id[1]
55
56
  docidentifiers&.each do |u|
56
57
  if %w(DOI IETF).include? u["type"]
57
58
  r.seriesInfo nil, **attr_code(value: u.text, name: u["type"])
@@ -67,15 +68,6 @@ module IsoDoc::Ietf
67
68
  end
68
69
  end
69
70
 
70
- def bibitem_ref_code(b)
71
- id = b.at(ns("./docidentifier[not(@type = 'DOI' or @type = 'metanorma' "\
72
- "or @type = 'ISSN' or @type = 'ISBN' or @type = 'IETF')]"))
73
- return id if id
74
- id = Nokogiri::XML::Node.new("docidentifier", b.document)
75
- id << "(NO ID)"
76
- id
77
- end
78
-
79
71
  def relaton_to_author(b, f)
80
72
  auths = b.xpath(ns("./contributor[xmlns:role/@type = 'author' or "\
81
73
  "xmlns:role/@type = 'editor']"))
@@ -50,8 +50,13 @@ module IsoDoc::Ietf
50
50
  end
51
51
  end
52
52
 
53
+ def textcleanup(docxml)
54
+ passthrough_cleanup(docxml)
55
+ end
56
+
53
57
  def postprocess(result, filename, dir)
54
- result = from_xhtml(cleanup(to_xhtml(result))).sub(/<!DOCTYPE[^>]+>\n/, "").
58
+ result = from_xhtml(cleanup(to_xhtml(textcleanup(result)))).
59
+ sub(/<!DOCTYPE[^>]+>\n/, "").
55
60
  sub(/(<rfc[^<]+? )lang="[^"]+"/, "\\1")
56
61
  File.open("#{filename}.rfc.xml", "w:UTF-8") { |f| f.write(result) }
57
62
  @files_to_delete.each { |f| FileUtils.rm_rf f }
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ietf
3
- VERSION = "2.0.10".freeze
3
+ VERSION = "2.0.11".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
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-05-13 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc