relaton-ietf 1.1.1 → 1.2.1

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: ed5846b470eedb791848d99a33c6401dc9b4867d9222ea60270969a987040435
4
- data.tar.gz: da3b3ca9820a4fd37fe4190211ca4bccf5e1ba77dd5d3fc255c12464f8584efb
3
+ metadata.gz: 58a6d15eff43d9d6589f7c2cac76895c8571f2170ddc1f11786baf294a8ca63c
4
+ data.tar.gz: 9df89ba96c6ab8ce2e87184a496aa9673fc0862665895a7f5bf39caec0242599
5
5
  SHA512:
6
- metadata.gz: '0870cba19a84bb92de960ba5dd54e396d784cd7b00b207bfa80a2fb6c5b7baa4117d8ffff6200e4921b009c743f119584254750e964c827594e82ba3f1e3eae7'
7
- data.tar.gz: bce648a595ee447883dc5c97aa24b57f35f30000e063798d1b287e36ea284e818de44eae9efcf7b7d3410096c3f357c02719a437760ed8b0e7b5d9ffa2b44462
6
+ metadata.gz: f9a510c71ff4bb76ddf5734eec7e816e774c1218f7d1a5f03f173ee992bb16d6dfbf2624a21341d3952e6a06a11d7aa49d8347f429ac8938b9bcc59d333e889a
7
+ data.tar.gz: c074d6b726cfa3c6f4f9b65658c28a736a151d50c2958bd771c8cbe2eda310baf8fcf60dfb9ecd78c1a9959dc24882be0aec79ab90eef4438077d3133ce081ef
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
@@ -532,7 +532,7 @@
532
532
  </define>
533
533
  <define name="LocalityType">
534
534
  <data type="string">
535
- <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|locality:[a-zA-Z0-9_]+</param>
535
+ <param name="pattern">section|clause|part|paragraph|chapter|page|whole|table|annex|figure|note|list|example|volume|issue|time|anchor|locality:[a-zA-Z0-9_]+</param>
536
536
  </data>
537
537
  </define>
538
538
  <define name="referenceFrom">
@@ -69,12 +69,12 @@
69
69
  </attribute>
70
70
  </optional>
71
71
  <optional>
72
- <attribute name="keepWithNext">
72
+ <attribute name="keep-with-next">
73
73
  <data type="boolean"/>
74
74
  </attribute>
75
75
  </optional>
76
76
  <optional>
77
- <attribute name="keepWithPrevious">
77
+ <attribute name="keep-with-previous">
78
78
  <data type="boolean"/>
79
79
  </attribute>
80
80
  </optional>
@@ -297,6 +297,9 @@
297
297
  <data type="boolean"/>
298
298
  </attribute>
299
299
  </optional>
300
+ <optional>
301
+ <attribute name="number"/>
302
+ </optional>
300
303
  <optional>
301
304
  <attribute name="subsequence"/>
302
305
  </optional>
@@ -379,6 +382,9 @@
379
382
  <data type="boolean"/>
380
383
  </attribute>
381
384
  </optional>
385
+ <optional>
386
+ <attribute name="number"/>
387
+ </optional>
382
388
  <optional>
383
389
  <attribute name="subsequence"/>
384
390
  </optional>
@@ -64,6 +64,85 @@
64
64
  <text/>
65
65
  </element>
66
66
  </define>
67
+ <define name="ul">
68
+ <element name="ul">
69
+ <attribute name="id">
70
+ <data type="ID"/>
71
+ </attribute>
72
+ <optional>
73
+ <attribute name="keep-with-next">
74
+ <data type="boolean"/>
75
+ </attribute>
76
+ </optional>
77
+ <optional>
78
+ <attribute name="keep-lines-together">
79
+ <data type="boolean"/>
80
+ </attribute>
81
+ </optional>
82
+ <oneOrMore>
83
+ <ref name="li"/>
84
+ </oneOrMore>
85
+ <zeroOrMore>
86
+ <ref name="note"/>
87
+ </zeroOrMore>
88
+ </element>
89
+ </define>
90
+ <define name="ol">
91
+ <element name="ol">
92
+ <attribute name="id">
93
+ <data type="ID"/>
94
+ </attribute>
95
+ <optional>
96
+ <attribute name="keep-with-next">
97
+ <data type="boolean"/>
98
+ </attribute>
99
+ </optional>
100
+ <optional>
101
+ <attribute name="keep-lines-together">
102
+ <data type="boolean"/>
103
+ </attribute>
104
+ </optional>
105
+ <attribute name="type">
106
+ <choice>
107
+ <value>roman</value>
108
+ <value>alphabet</value>
109
+ <value>arabic</value>
110
+ <value>roman_upper</value>
111
+ <value>alphabet_upper</value>
112
+ </choice>
113
+ </attribute>
114
+ <oneOrMore>
115
+ <ref name="li"/>
116
+ </oneOrMore>
117
+ <zeroOrMore>
118
+ <ref name="note"/>
119
+ </zeroOrMore>
120
+ </element>
121
+ </define>
122
+ <define name="dl">
123
+ <element name="dl">
124
+ <attribute name="id">
125
+ <data type="ID"/>
126
+ </attribute>
127
+ <optional>
128
+ <attribute name="keep-with-next">
129
+ <data type="boolean"/>
130
+ </attribute>
131
+ </optional>
132
+ <optional>
133
+ <attribute name="keep-lines-together">
134
+ <data type="boolean"/>
135
+ </attribute>
136
+ </optional>
137
+ <oneOrMore>
138
+ <ref name="dt"/>
139
+ <ref name="dd"/>
140
+ </oneOrMore>
141
+ <zeroOrMore>
142
+ <ref name="note"/>
143
+ </zeroOrMore>
144
+ </element>
145
+ </define>
67
146
  <define name="example">
68
147
  <element name="example">
69
148
  <attribute name="id">
@@ -77,6 +156,19 @@
77
156
  <optional>
78
157
  <attribute name="subsequence"/>
79
158
  </optional>
159
+ <optional>
160
+ <attribute name="number"/>
161
+ </optional>
162
+ <optional>
163
+ <attribute name="keep-with-next">
164
+ <data type="boolean"/>
165
+ </attribute>
166
+ </optional>
167
+ <optional>
168
+ <attribute name="keep-lines-together">
169
+ <data type="boolean"/>
170
+ </attribute>
171
+ </optional>
80
172
  <optional>
81
173
  <ref name="tname"/>
82
174
  </optional>
@@ -97,6 +189,296 @@
97
189
  </zeroOrMore>
98
190
  </element>
99
191
  </define>
192
+ <define name="table">
193
+ <element name="table">
194
+ <attribute name="id">
195
+ <data type="ID"/>
196
+ </attribute>
197
+ <optional>
198
+ <attribute name="unnumbered">
199
+ <data type="boolean"/>
200
+ </attribute>
201
+ </optional>
202
+ <optional>
203
+ <attribute name="number"/>
204
+ </optional>
205
+ <optional>
206
+ <attribute name="subsequence"/>
207
+ </optional>
208
+ <optional>
209
+ <attribute name="alt"/>
210
+ </optional>
211
+ <optional>
212
+ <attribute name="summary"/>
213
+ </optional>
214
+ <optional>
215
+ <attribute name="uri">
216
+ <data type="anyURI"/>
217
+ </attribute>
218
+ </optional>
219
+ <optional>
220
+ <attribute name="keep-with-next">
221
+ <data type="boolean"/>
222
+ </attribute>
223
+ </optional>
224
+ <optional>
225
+ <attribute name="keep-lines-together">
226
+ <data type="boolean"/>
227
+ </attribute>
228
+ </optional>
229
+ <optional>
230
+ <ref name="tname"/>
231
+ </optional>
232
+ <optional>
233
+ <ref name="thead"/>
234
+ </optional>
235
+ <ref name="tbody"/>
236
+ <optional>
237
+ <ref name="tfoot"/>
238
+ </optional>
239
+ <zeroOrMore>
240
+ <ref name="table-note"/>
241
+ </zeroOrMore>
242
+ <optional>
243
+ <ref name="dl"/>
244
+ </optional>
245
+ </element>
246
+ </define>
247
+ <define name="figure">
248
+ <element name="figure">
249
+ <attribute name="id">
250
+ <data type="ID"/>
251
+ </attribute>
252
+ <optional>
253
+ <attribute name="unnumbered">
254
+ <data type="boolean"/>
255
+ </attribute>
256
+ </optional>
257
+ <optional>
258
+ <attribute name="number"/>
259
+ </optional>
260
+ <optional>
261
+ <attribute name="subsequence"/>
262
+ </optional>
263
+ <optional>
264
+ <attribute name="keep-with-next">
265
+ <data type="boolean"/>
266
+ </attribute>
267
+ </optional>
268
+ <optional>
269
+ <attribute name="keep-lines-together">
270
+ <data type="boolean"/>
271
+ </attribute>
272
+ </optional>
273
+ <optional>
274
+ <attribute name="class"/>
275
+ </optional>
276
+ <optional>
277
+ <ref name="source"/>
278
+ </optional>
279
+ <optional>
280
+ <ref name="tname"/>
281
+ </optional>
282
+ <choice>
283
+ <ref name="image"/>
284
+ <ref name="video"/>
285
+ <ref name="audio"/>
286
+ <ref name="pre"/>
287
+ <oneOrMore>
288
+ <ref name="paragraph-with-footnote"/>
289
+ </oneOrMore>
290
+ <zeroOrMore>
291
+ <ref name="figure"/>
292
+ </zeroOrMore>
293
+ </choice>
294
+ <zeroOrMore>
295
+ <ref name="fn"/>
296
+ </zeroOrMore>
297
+ <optional>
298
+ <ref name="dl"/>
299
+ </optional>
300
+ <zeroOrMore>
301
+ <ref name="note"/>
302
+ </zeroOrMore>
303
+ </element>
304
+ </define>
305
+ <define name="sourcecode">
306
+ <element name="sourcecode">
307
+ <attribute name="id">
308
+ <data type="ID"/>
309
+ </attribute>
310
+ <optional>
311
+ <attribute name="unnumbered">
312
+ <data type="boolean"/>
313
+ </attribute>
314
+ </optional>
315
+ <optional>
316
+ <attribute name="number"/>
317
+ </optional>
318
+ <optional>
319
+ <attribute name="subsequence"/>
320
+ </optional>
321
+ <optional>
322
+ <attribute name="keep-with-next">
323
+ <data type="boolean"/>
324
+ </attribute>
325
+ </optional>
326
+ <optional>
327
+ <attribute name="keep-lines-together">
328
+ <data type="boolean"/>
329
+ </attribute>
330
+ </optional>
331
+ <optional>
332
+ <attribute name="lang"/>
333
+ </optional>
334
+ <optional>
335
+ <ref name="tname"/>
336
+ </optional>
337
+ <oneOrMore>
338
+ <choice>
339
+ <text/>
340
+ <ref name="callout"/>
341
+ </choice>
342
+ </oneOrMore>
343
+ <zeroOrMore>
344
+ <ref name="annotation"/>
345
+ </zeroOrMore>
346
+ <zeroOrMore>
347
+ <ref name="note"/>
348
+ </zeroOrMore>
349
+ </element>
350
+ </define>
351
+ <define name="formula">
352
+ <element name="formula">
353
+ <attribute name="id">
354
+ <data type="ID"/>
355
+ </attribute>
356
+ <optional>
357
+ <attribute name="unnumbered">
358
+ <data type="boolean"/>
359
+ </attribute>
360
+ </optional>
361
+ <optional>
362
+ <attribute name="number"/>
363
+ </optional>
364
+ <optional>
365
+ <attribute name="subsequence"/>
366
+ </optional>
367
+ <optional>
368
+ <attribute name="keep-with-next">
369
+ <data type="boolean"/>
370
+ </attribute>
371
+ </optional>
372
+ <optional>
373
+ <attribute name="keep-lines-together">
374
+ <data type="boolean"/>
375
+ </attribute>
376
+ </optional>
377
+ <optional>
378
+ <attribute name="inequality">
379
+ <data type="boolean"/>
380
+ </attribute>
381
+ </optional>
382
+ <ref name="stem"/>
383
+ <optional>
384
+ <ref name="dl"/>
385
+ </optional>
386
+ <zeroOrMore>
387
+ <ref name="note"/>
388
+ </zeroOrMore>
389
+ </element>
390
+ </define>
391
+ <define name="ParagraphType">
392
+ <attribute name="id">
393
+ <data type="ID"/>
394
+ </attribute>
395
+ <optional>
396
+ <attribute name="align">
397
+ <ref name="Alignments"/>
398
+ </attribute>
399
+ </optional>
400
+ <optional>
401
+ <attribute name="keep-with-next">
402
+ <data type="boolean"/>
403
+ </attribute>
404
+ </optional>
405
+ <optional>
406
+ <attribute name="keep-lines-together">
407
+ <data type="boolean"/>
408
+ </attribute>
409
+ </optional>
410
+ <zeroOrMore>
411
+ <ref name="TextElement"/>
412
+ </zeroOrMore>
413
+ <zeroOrMore>
414
+ <ref name="note"/>
415
+ </zeroOrMore>
416
+ </define>
417
+ <define name="paragraph-with-footnote">
418
+ <element name="p">
419
+ <attribute name="id">
420
+ <data type="ID"/>
421
+ </attribute>
422
+ <optional>
423
+ <attribute name="align">
424
+ <ref name="Alignments"/>
425
+ </attribute>
426
+ </optional>
427
+ <optional>
428
+ <attribute name="keep-with-next">
429
+ <data type="boolean"/>
430
+ </attribute>
431
+ </optional>
432
+ <optional>
433
+ <attribute name="keep-lines-together">
434
+ <data type="boolean"/>
435
+ </attribute>
436
+ </optional>
437
+ <zeroOrMore>
438
+ <choice>
439
+ <ref name="TextElement"/>
440
+ <ref name="fn"/>
441
+ </choice>
442
+ </zeroOrMore>
443
+ <zeroOrMore>
444
+ <ref name="note"/>
445
+ </zeroOrMore>
446
+ </element>
447
+ </define>
448
+ <define name="quote">
449
+ <element name="quote">
450
+ <attribute name="id">
451
+ <data type="ID"/>
452
+ </attribute>
453
+ <optional>
454
+ <attribute name="alignment">
455
+ <ref name="Alignments"/>
456
+ </attribute>
457
+ </optional>
458
+ <optional>
459
+ <attribute name="keep-with-next">
460
+ <data type="boolean"/>
461
+ </attribute>
462
+ </optional>
463
+ <optional>
464
+ <attribute name="keep-lines-together">
465
+ <data type="boolean"/>
466
+ </attribute>
467
+ </optional>
468
+ <optional>
469
+ <ref name="quote-source"/>
470
+ </optional>
471
+ <optional>
472
+ <ref name="quote-author"/>
473
+ </optional>
474
+ <oneOrMore>
475
+ <ref name="paragraph-with-footnote"/>
476
+ </oneOrMore>
477
+ <zeroOrMore>
478
+ <ref name="note"/>
479
+ </zeroOrMore>
480
+ </element>
481
+ </define>
100
482
  <define name="BibDataExtensionType">
101
483
  <ref name="doctype"/>
102
484
  <optional>
@@ -165,6 +547,30 @@
165
547
  <attribute name="id">
166
548
  <data type="ID"/>
167
549
  </attribute>
550
+ <optional>
551
+ <attribute name="unnumbered">
552
+ <data type="boolean"/>
553
+ </attribute>
554
+ </optional>
555
+ <optional>
556
+ <attribute name="number"/>
557
+ </optional>
558
+ <optional>
559
+ <attribute name="subsequence"/>
560
+ </optional>
561
+ <optional>
562
+ <attribute name="keep-with-next">
563
+ <data type="boolean"/>
564
+ </attribute>
565
+ </optional>
566
+ <optional>
567
+ <attribute name="keep-lines-together">
568
+ <data type="boolean"/>
569
+ </attribute>
570
+ </optional>
571
+ <optional>
572
+ <attribute name="type"/>
573
+ </optional>
168
574
  <oneOrMore>
169
575
  <choice>
170
576
  <ref name="paragraph"/>
@@ -910,6 +1316,27 @@
910
1316
  <attribute name="id">
911
1317
  <data type="ID"/>
912
1318
  </attribute>
1319
+ <optional>
1320
+ <attribute name="unnumbered">
1321
+ <data type="boolean"/>
1322
+ </attribute>
1323
+ </optional>
1324
+ <optional>
1325
+ <attribute name="number"/>
1326
+ </optional>
1327
+ <optional>
1328
+ <attribute name="subsequence"/>
1329
+ </optional>
1330
+ <optional>
1331
+ <attribute name="keep-with-next">
1332
+ <data type="boolean"/>
1333
+ </attribute>
1334
+ </optional>
1335
+ <optional>
1336
+ <attribute name="keep-lines-together">
1337
+ <data type="boolean"/>
1338
+ </attribute>
1339
+ </optional>
913
1340
  <oneOrMore>
914
1341
  <choice>
915
1342
  <ref name="paragraph"/>
@@ -1,5 +1,7 @@
1
1
  module RelatonIetf
2
2
  class IetfBibliographicItem < RelatonBib::BibliographicItem
3
+ DOCTYPES = %w[rfc internet-draft].freeze
4
+
3
5
  # @return [String, NilClass]
4
6
  attr_reader :doctype
5
7
 
@@ -9,9 +11,11 @@ module RelatonIetf
9
11
  # @param doctype [String]
10
12
  # @param keyword [Array<String>]
11
13
  def initialize(**args)
12
- @doctype = args.delete :doctype
13
- # @keyword = args.delete(:keyword) || []
14
+ if args[:doctype] && !DOCTYPES.include?(args[:doctype])
15
+ warn "[relaton-ietf] WARNING: invalid doctype #{args[:doctype]}"
16
+ end
14
17
  super
18
+ # @doctype = args[:doctype]
15
19
  end
16
20
 
17
21
  # @param builder
@@ -20,10 +24,9 @@ module RelatonIetf
20
24
  def to_xml(builder = nil, **opts)
21
25
  opts[:date_format] ||= :short
22
26
  super builder, **opts do |b|
23
- if opts[:bibdata]
27
+ if opts[:bibdata] && doctype
24
28
  b.ext do
25
29
  b.doctype doctype if doctype
26
- # keyword.each { |k| b.keyword k }
27
30
  end
28
31
  end
29
32
  end
@@ -111,7 +111,10 @@ module RelatonIetf
111
111
  error = nil
112
112
  uri_nums.each do |n|
113
113
  /(?<=-)(?<ver>\d{2})$/ =~ ref
114
- ref.sub! /-\d{2}/, "" if ver && n == "3"
114
+ if n == "3"
115
+ ref.sub! /-\d{2}/, "" if ver
116
+ ref.sub! /(?<=I-D\.)draft-/, ""
117
+ end
115
118
 
116
119
  uri = "#{RFC_URI_PATTERN}#{n}/reference.#{ref.sub(/\s|\u00a0/, ".")}.xml"
117
120
  begin
@@ -212,7 +215,7 @@ module RelatonIetf
212
215
  mem << { entity: new_org(si[:stream], nil), role: [type: "author"] }
213
216
  end
214
217
  orgs + reference.xpath(
215
- "front/author/organization[string-length(.) > 0]",
218
+ "front/author[not(@surname)][not(@fullname)]/organization",
216
219
  ).map do |org|
217
220
  { entity: new_org(org.text, nil), role: [type: "author"] }
218
221
  end
@@ -330,9 +333,13 @@ module RelatonIetf
330
333
  # @return [Array<RelatonBib::DocumentIdentifier>]
331
334
  #
332
335
  def docids(reference, ver)
333
- id = (reference[:anchor] || reference[:docName]).sub(/^(RFC)/, "\\1 ")
336
+ id = (reference[:anchor] || reference[:docName] || reference[:number])
334
337
  ret = []
335
- ret << RelatonBib::DocumentIdentifier.new(type: "IETF", id: id)
338
+ if id
339
+ ret << RelatonBib::DocumentIdentifier.new(
340
+ type: "IETF", id: id.sub(/^(RFC)/, "\\1 "),
341
+ )
342
+ end
336
343
  if (id = reference[:anchor])
337
344
  ret << RelatonBib::DocumentIdentifier.new(type: "rfc-anchor", id: id)
338
345
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIetf
2
- VERSION = "1.1.1".freeze
2
+ VERSION = "1.2.1".freeze
3
3
  end
@@ -3,19 +3,26 @@ require "nokogiri"
3
3
  module RelatonIetf
4
4
  class XMLParser < RelatonBib::XMLParser
5
5
  class << self
6
- def from_xml(xml)
7
- doc = Nokogiri::XML(xml)
8
- doc.remove_namespaces!
9
- ietfitem = doc.at("/bibitem|/bibdata")
10
- if ietfitem
11
- RelatonIetf::IetfBibliographicItem.new(item_data(ietfitem))
12
- elsif
13
- warn "[relato-ietf] can't find bibitem or bibdata element in the XML"
14
- end
15
- end
6
+ # def from_xml(xml)
7
+ # doc = Nokogiri::XML(xml)
8
+ # doc.remove_namespaces!
9
+ # ietfitem = doc.at("/bibitem|/bibdata")
10
+ # if ietfitem
11
+ # RelatonIetf::IetfBibliographicItem.new(item_data(ietfitem))
12
+ # elsif
13
+ # warn "[relato-ietf] can't find bibitem or bibdata element in the XML"
14
+ # end
15
+ # end
16
16
 
17
17
  private
18
18
 
19
+ # override RelatonBib::BibliographicItem.bib_item method
20
+ # @param item_hash [Hash]
21
+ # @return [RelatonIetf::IetfBibliographicItem]
22
+ def bib_item(item_hash)
23
+ IetfBibliographicItem.new item_hash
24
+ end
25
+
19
26
  def item_data(ietfitem)
20
27
  data = super
21
28
  ext = ietfitem.at "./ext"
@@ -40,5 +40,5 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency "vcr"
41
41
  spec.add_development_dependency "webmock"
42
42
 
43
- spec.add_dependency "relaton-bib", "~> 1.1.0"
43
+ spec.add_dependency "relaton-bib", "~> 1.2.0"
44
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ietf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
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-06-09 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.1.0
159
+ version: 1.2.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 1.1.0
166
+ version: 1.2.0
167
167
  description: "RelatonIetf: retrieve IETF Standards for bibliographic use \nusing the
168
168
  BibliographicItem model.\n\nFormerly known as rfcbib.\n"
169
169
  email:
@@ -184,12 +184,12 @@ files:
184
184
  - README.adoc
185
185
  - Rakefile
186
186
  - bin/console
187
+ - bin/rspec
187
188
  - bin/setup
188
189
  - grammars/basicdoc.rng
189
190
  - grammars/biblio.rng
190
191
  - grammars/ietf.rng
191
192
  - grammars/isodoc.rng
192
- - grammars/isostandard.rng
193
193
  - grammars/reqt.rng
194
194
  - lib/relaton/provider_ietf.rb
195
195
  - lib/relaton_ietf.rb
@@ -1,530 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
4
- <include href="isodoc.rng">
5
- <start>
6
- <ref name="iso-standard"/>
7
- </start>
8
- <define name="organization">
9
- <element name="organization">
10
- <oneOrMore>
11
- <ref name="orgname"/>
12
- </oneOrMore>
13
- <optional>
14
- <ref name="abbreviation"/>
15
- </optional>
16
- <optional>
17
- <ref name="uri"/>
18
- </optional>
19
- <zeroOrMore>
20
- <ref name="org-identifier"/>
21
- </zeroOrMore>
22
- <zeroOrMore>
23
- <ref name="contact"/>
24
- </zeroOrMore>
25
- <optional>
26
- <ref name="technical-committee"/>
27
- </optional>
28
- <optional>
29
- <ref name="subcommittee"/>
30
- </optional>
31
- <optional>
32
- <ref name="workgroup"/>
33
- </optional>
34
- <optional>
35
- <ref name="secretariat"/>
36
- </optional>
37
- </element>
38
- </define>
39
- <define name="BibDataExtensionType">
40
- <ref name="doctype"/>
41
- <ref name="editorialgroup"/>
42
- <zeroOrMore>
43
- <ref name="ics"/>
44
- </zeroOrMore>
45
- <ref name="structuredidentifier"/>
46
- <optional>
47
- <ref name="stagename"/>
48
- </optional>
49
- </define>
50
- <define name="bdate">
51
- <element name="date">
52
- <attribute name="type">
53
- <choice>
54
- <ref name="BibliographicDateType"/>
55
- <text/>
56
- </choice>
57
- </attribute>
58
- <choice>
59
- <group>
60
- <element name="from">
61
- <ref name="ISO8601Date"/>
62
- </element>
63
- <optional>
64
- <element name="to">
65
- <ref name="ISO8601Date"/>
66
- </element>
67
- </optional>
68
- </group>
69
- <element name="on">
70
- <choice>
71
- <ref name="ISO8601Date"/>
72
- <value>--</value>
73
- <value>–</value>
74
- </choice>
75
- </element>
76
- </choice>
77
- </element>
78
- </define>
79
- <define name="ul">
80
- <element name="ul">
81
- <attribute name="id">
82
- <data type="ID"/>
83
- </attribute>
84
- <oneOrMore>
85
- <ref name="ul_li"/>
86
- </oneOrMore>
87
- <zeroOrMore>
88
- <ref name="note"/>
89
- </zeroOrMore>
90
- </element>
91
- </define>
92
- <define name="sections">
93
- <element name="sections">
94
- <zeroOrMore>
95
- <choice>
96
- <ref name="note"/>
97
- <ref name="admonition"/>
98
- </choice>
99
- </zeroOrMore>
100
- <ref name="clause"/>
101
- <optional>
102
- <choice>
103
- <ref name="term-clause"/>
104
- <ref name="terms"/>
105
- </choice>
106
- </optional>
107
- <optional>
108
- <ref name="definitions"/>
109
- </optional>
110
- <oneOrMore>
111
- <ref name="clause"/>
112
- </oneOrMore>
113
- </element>
114
- </define>
115
- <define name="Clause-Section">
116
- <optional>
117
- <attribute name="id">
118
- <data type="ID"/>
119
- </attribute>
120
- </optional>
121
- <optional>
122
- <attribute name="language"/>
123
- </optional>
124
- <optional>
125
- <attribute name="script"/>
126
- </optional>
127
- <optional>
128
- <attribute name="inline-header">
129
- <data type="boolean"/>
130
- </attribute>
131
- </optional>
132
- <optional>
133
- <attribute name="obligation">
134
- <choice>
135
- <value>normative</value>
136
- <value>informative</value>
137
- </choice>
138
- </attribute>
139
- </optional>
140
- <optional>
141
- <ref name="section-title"/>
142
- </optional>
143
- <choice>
144
- <group>
145
- <oneOrMore>
146
- <ref name="BasicBlock"/>
147
- </oneOrMore>
148
- <zeroOrMore>
149
- <ref name="note"/>
150
- </zeroOrMore>
151
- </group>
152
- <oneOrMore>
153
- <ref name="clause-subsection"/>
154
- </oneOrMore>
155
- </choice>
156
- </define>
157
- <define name="term">
158
- <element name="term">
159
- <optional>
160
- <attribute name="id">
161
- <data type="ID"/>
162
- </attribute>
163
- </optional>
164
- <ref name="preferred"/>
165
- <zeroOrMore>
166
- <ref name="admitted"/>
167
- </zeroOrMore>
168
- <zeroOrMore>
169
- <ref name="deprecates"/>
170
- </zeroOrMore>
171
- <optional>
172
- <ref name="termdomain"/>
173
- </optional>
174
- <ref name="definition"/>
175
- <zeroOrMore>
176
- <ref name="termnote"/>
177
- </zeroOrMore>
178
- <zeroOrMore>
179
- <ref name="termexample"/>
180
- </zeroOrMore>
181
- <zeroOrMore>
182
- <ref name="termsource"/>
183
- </zeroOrMore>
184
- </element>
185
- </define>
186
- <define name="definition">
187
- <element name="definition">
188
- <oneOrMore>
189
- <choice>
190
- <ref name="paragraph"/>
191
- <ref name="figure"/>
192
- <ref name="formula"/>
193
- </choice>
194
- </oneOrMore>
195
- </element>
196
- </define>
197
- <define name="annex">
198
- <element name="annex">
199
- <optional>
200
- <attribute name="id">
201
- <data type="ID"/>
202
- </attribute>
203
- </optional>
204
- <optional>
205
- <attribute name="language"/>
206
- </optional>
207
- <optional>
208
- <attribute name="script"/>
209
- </optional>
210
- <optional>
211
- <attribute name="inline-header">
212
- <data type="boolean"/>
213
- </attribute>
214
- </optional>
215
- <optional>
216
- <attribute name="obligation">
217
- <choice>
218
- <value>normative</value>
219
- <value>informative</value>
220
- </choice>
221
- </attribute>
222
- </optional>
223
- <optional>
224
- <ref name="section-title"/>
225
- </optional>
226
- <zeroOrMore>
227
- <!--
228
- allow hanging paragraps in annexes: they introduce lists
229
- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
230
- -->
231
- <ref name="BasicBlock"/>
232
- </zeroOrMore>
233
- <zeroOrMore>
234
- <ref name="note"/>
235
- </zeroOrMore>
236
- <zeroOrMore>
237
- <ref name="clause-hanging-paragraph-with-footnote"/>
238
- </zeroOrMore>
239
- <zeroOrMore>
240
- <ref name="annex-appendix"/>
241
- </zeroOrMore>
242
- </element>
243
- </define>
244
- <define name="AdmonitionType">
245
- <choice>
246
- <value>danger</value>
247
- <value>caution</value>
248
- <value>warning</value>
249
- <value>important</value>
250
- <value>safety precautions</value>
251
- </choice>
252
- </define>
253
- <define name="preface">
254
- <element name="preface">
255
- <optional>
256
- <ref name="preface_abstract"/>
257
- </optional>
258
- <ref name="foreword"/>
259
- <optional>
260
- <ref name="introduction"/>
261
- </optional>
262
- </element>
263
- </define>
264
- <define name="DocumentType">
265
- <choice>
266
- <value>international-standard</value>
267
- <value>technical-specification</value>
268
- <value>technical-report</value>
269
- <value>publicly-available-specification</value>
270
- <value>international-workshop-agreement</value>
271
- <value>guide</value>
272
- <value>amendment</value>
273
- <value>technical-corrigendum</value>
274
- </choice>
275
- </define>
276
- <define name="structuredidentifier">
277
- <element name="structuredidentifier">
278
- <optional>
279
- <attribute name="type"/>
280
- </optional>
281
- <group>
282
- <ref name="documentnumber"/>
283
- <optional>
284
- <ref name="tc-documentnumber"/>
285
- </optional>
286
- </group>
287
- </element>
288
- </define>
289
- <define name="foreword">
290
- <element name="foreword">
291
- <ref name="Basic-Section"/>
292
- </element>
293
- </define>
294
- <define name="introduction">
295
- <element name="introduction">
296
- <ref name="Content-Section"/>
297
- </element>
298
- </define>
299
- <define name="editorialgroup">
300
- <element name="editorialgroup">
301
- <oneOrMore>
302
- <ref name="technical-committee"/>
303
- </oneOrMore>
304
- <zeroOrMore>
305
- <ref name="subcommittee"/>
306
- </zeroOrMore>
307
- <zeroOrMore>
308
- <ref name="workgroup"/>
309
- </zeroOrMore>
310
- <optional>
311
- <ref name="secretariat"/>
312
- </optional>
313
- </element>
314
- </define>
315
- <define name="Content-Section">
316
- <optional>
317
- <attribute name="id">
318
- <data type="ID"/>
319
- </attribute>
320
- </optional>
321
- <optional>
322
- <attribute name="language"/>
323
- </optional>
324
- <optional>
325
- <attribute name="script"/>
326
- </optional>
327
- <optional>
328
- <attribute name="obligation">
329
- <choice>
330
- <value>normative</value>
331
- <value>informative</value>
332
- </choice>
333
- </attribute>
334
- </optional>
335
- <optional>
336
- <ref name="section-title"/>
337
- </optional>
338
- <choice>
339
- <group>
340
- <zeroOrMore>
341
- <ref name="BasicBlock"/>
342
- </zeroOrMore>
343
- <zeroOrMore>
344
- <ref name="note"/>
345
- </zeroOrMore>
346
- </group>
347
- <oneOrMore>
348
- <ref name="content-subsection"/>
349
- </oneOrMore>
350
- </choice>
351
- </define>
352
- <define name="table">
353
- <element name="table">
354
- <attribute name="id">
355
- <data type="ID"/>
356
- </attribute>
357
- <optional>
358
- <attribute name="width"/>
359
- </optional>
360
- <optional>
361
- <attribute name="unnumbered">
362
- <data type="boolean"/>
363
- </attribute>
364
- </optional>
365
- <optional>
366
- <attribute name="subsequence"/>
367
- </optional>
368
- <optional>
369
- <attribute name="alt"/>
370
- </optional>
371
- <optional>
372
- <attribute name="summary"/>
373
- </optional>
374
- <optional>
375
- <attribute name="uri">
376
- <data type="anyURI"/>
377
- </attribute>
378
- </optional>
379
- <optional>
380
- <ref name="tname"/>
381
- </optional>
382
- <optional>
383
- <ref name="thead"/>
384
- </optional>
385
- <ref name="tbody"/>
386
- <optional>
387
- <ref name="tfoot"/>
388
- </optional>
389
- <zeroOrMore>
390
- <ref name="table-note"/>
391
- </zeroOrMore>
392
- <optional>
393
- <ref name="dl"/>
394
- </optional>
395
- </element>
396
- </define>
397
- </include>
398
- <!-- end overrides -->
399
- <!--
400
- We display the Normative References between scope and terms; but to keep the
401
- grammar simple, we keep the references together
402
- -->
403
- <define name="iso-standard">
404
- <element name="iso-standard">
405
- <ref name="bibdata"/>
406
- <zeroOrMore>
407
- <ref name="termdocsource"/>
408
- </zeroOrMore>
409
- <optional>
410
- <ref name="boilerplate"/>
411
- </optional>
412
- <ref name="preface"/>
413
- <oneOrMore>
414
- <ref name="sections"/>
415
- </oneOrMore>
416
- <zeroOrMore>
417
- <ref name="annex"/>
418
- </zeroOrMore>
419
- <ref name="bibliography"/>
420
- </element>
421
- </define>
422
- <define name="documentnumber">
423
- <element name="project-number">
424
- <optional>
425
- <attribute name="part">
426
- <data type="int"/>
427
- </attribute>
428
- </optional>
429
- <optional>
430
- <attribute name="subpart">
431
- <data type="int"/>
432
- </attribute>
433
- </optional>
434
- <text/>
435
- </element>
436
- </define>
437
- <define name="tc-documentnumber">
438
- <element name="tc-document-number">
439
- <data type="int"/>
440
- </element>
441
- </define>
442
- <define name="subcommittee">
443
- <element name="subcommittee">
444
- <ref name="IsoWorkgroup"/>
445
- </element>
446
- </define>
447
- <define name="workgroup">
448
- <element name="workgroup">
449
- <ref name="IsoWorkgroup"/>
450
- </element>
451
- </define>
452
- <define name="secretariat">
453
- <element name="secretariat">
454
- <text/>
455
- </element>
456
- </define>
457
- <define name="clause-hanging-paragraph-with-footnote">
458
- <element name="clause">
459
- <optional>
460
- <attribute name="id">
461
- <data type="ID"/>
462
- </attribute>
463
- </optional>
464
- <optional>
465
- <attribute name="language"/>
466
- </optional>
467
- <optional>
468
- <attribute name="script"/>
469
- </optional>
470
- <optional>
471
- <attribute name="inline-header">
472
- <data type="boolean"/>
473
- </attribute>
474
- </optional>
475
- <optional>
476
- <attribute name="obligation">
477
- <choice>
478
- <value>normative</value>
479
- <value>informative</value>
480
- </choice>
481
- </attribute>
482
- </optional>
483
- <optional>
484
- <ref name="section-title"/>
485
- </optional>
486
- <zeroOrMore>
487
- <!-- allow hanging paragraphs in annexes: they introduce lists -->
488
- <ref name="BasicBlock"/>
489
- </zeroOrMore>
490
- <zeroOrMore>
491
- <ref name="note"/>
492
- </zeroOrMore>
493
- <zeroOrMore>
494
- <ref name="clause-hanging-paragraph-with-footnote"/>
495
- </zeroOrMore>
496
- </element>
497
- </define>
498
- <define name="annex-appendix">
499
- <element name="appendix">
500
- <ref name="Clause-Section"/>
501
- </element>
502
- </define>
503
- <define name="ul_li">
504
- <element name="li">
505
- <optional>
506
- <attribute name="id">
507
- <data type="ID"/>
508
- </attribute>
509
- </optional>
510
- <optional>
511
- <attribute name="uncheckedcheckbox">
512
- <data type="boolean"/>
513
- </attribute>
514
- </optional>
515
- <optional>
516
- <attribute name="checkedcheckbox">
517
- <data type="boolean"/>
518
- </attribute>
519
- </optional>
520
- <oneOrMore>
521
- <ref name="BasicBlock"/>
522
- </oneOrMore>
523
- </element>
524
- </define>
525
- <define name="stagename">
526
- <element name="stagename">
527
- <text/>
528
- </element>
529
- </define>
530
- </grammar>