metanorma-ietf 3.3.1 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ietf/references.rb +1 -1
- data/lib/metanorma/ietf/biblio.rng +28 -25
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -1
- data/lib/relaton/render/fields.rb +8 -0
- data/lib/relaton/render/parse.rb +16 -10
- data/metanorma-ietf.gemspec +1 -2
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5aabcc61900b281a88f27e9f535dcde55d76b8e9174842aea66a6647017eeb
|
4
|
+
data.tar.gz: 62b22962648168f94376adef64df8495a54d385039f59482f239a5279e70cc92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a29ebeffd4659064b921b8ee271b78b7588a9412aafa2274b043f7cca448ee467200c5897338d95a33999e0ef203b9b6614374aa302ebfa1bf32f816d976d1e5
|
7
|
+
data.tar.gz: 2506fb85aa36bba3ef0309e6276b74395303e52086faa4ee0f4badd40e5488f931e2eb60528e0c4750c0d74c3fd24a87d16825f5800abdf27c992da034d57b59
|
@@ -54,7 +54,7 @@ module IsoDoc
|
|
54
54
|
def ietf_bibitem(list, bib, _ordinal)
|
55
55
|
uris = bib.xpath(ns("./uri"))
|
56
56
|
target = nil
|
57
|
-
uris&.each { |u| target = u.text if u["type"]
|
57
|
+
uris&.each { |u| target = u.text if %w(src HTML).include?(u["type"]) }
|
58
58
|
list.reference **attr_code(target: target,
|
59
59
|
anchor: bib["id"]) do |r|
|
60
60
|
bibitem_render(r, bib)
|
@@ -338,29 +338,32 @@
|
|
338
338
|
</define>
|
339
339
|
<define name="organization">
|
340
340
|
<element name="organization">
|
341
|
-
<
|
342
|
-
<ref name="orgname"/>
|
343
|
-
</oneOrMore>
|
344
|
-
<zeroOrMore>
|
345
|
-
<ref name="subdivision"/>
|
346
|
-
</zeroOrMore>
|
347
|
-
<optional>
|
348
|
-
<ref name="abbreviation"/>
|
349
|
-
</optional>
|
350
|
-
<zeroOrMore>
|
351
|
-
<ref name="uri"/>
|
352
|
-
</zeroOrMore>
|
353
|
-
<zeroOrMore>
|
354
|
-
<ref name="org-identifier"/>
|
355
|
-
</zeroOrMore>
|
356
|
-
<zeroOrMore>
|
357
|
-
<ref name="contact"/>
|
358
|
-
</zeroOrMore>
|
359
|
-
<optional>
|
360
|
-
<ref name="logo"/>
|
361
|
-
</optional>
|
341
|
+
<ref name="OrganizationType"/>
|
362
342
|
</element>
|
363
343
|
</define>
|
344
|
+
<define name="OrganizationType">
|
345
|
+
<oneOrMore>
|
346
|
+
<ref name="orgname"/>
|
347
|
+
</oneOrMore>
|
348
|
+
<zeroOrMore>
|
349
|
+
<ref name="subdivision"/>
|
350
|
+
</zeroOrMore>
|
351
|
+
<optional>
|
352
|
+
<ref name="abbreviation"/>
|
353
|
+
</optional>
|
354
|
+
<zeroOrMore>
|
355
|
+
<ref name="uri"/>
|
356
|
+
</zeroOrMore>
|
357
|
+
<zeroOrMore>
|
358
|
+
<ref name="org-identifier"/>
|
359
|
+
</zeroOrMore>
|
360
|
+
<zeroOrMore>
|
361
|
+
<ref name="contact"/>
|
362
|
+
</zeroOrMore>
|
363
|
+
<optional>
|
364
|
+
<ref name="logo"/>
|
365
|
+
</optional>
|
366
|
+
</define>
|
364
367
|
<define name="orgname">
|
365
368
|
<element name="name">
|
366
369
|
<choice>
|
@@ -371,10 +374,10 @@
|
|
371
374
|
</define>
|
372
375
|
<define name="subdivision">
|
373
376
|
<element name="subdivision">
|
374
|
-
<
|
375
|
-
<
|
376
|
-
|
377
|
-
|
377
|
+
<optional>
|
378
|
+
<attribute name="type"/>
|
379
|
+
</optional>
|
380
|
+
<ref name="OrganizationType"/>
|
378
381
|
</element>
|
379
382
|
</define>
|
380
383
|
<define name="logo">
|
@@ -20,7 +20,7 @@ template:
|
|
20
20
|
# skip standardidentifier, it is inserted in front of formattedref within metanorma
|
21
21
|
# date is cleaned up into RFC XML formatting afterwards
|
22
22
|
# ref-included is cleaned up as referencegroup/reference in RFC XML afterwards
|
23
|
-
standard: "{% if stream %}<stream>{{stream}}</stream>{% endif %} <front> <title>{{ title }}</title> {{ creatornames }} <date_cleanme='true'>{{date}}</date> {% for k in keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{abstract}}</abstract> </front> {% for u in uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{authoritative_identifier | join: ', '}}</refcontent> {% endif %} {% for i in included %}<ref-included> {% if i.stream %}<stream>{{i.stream}}</stream>{% endif %} <front> <title>{% if i.title %}{{ i.title}}{%else%}[TITLE]{%endif%}</title> {% if i.creatornames %}{{ i.creatornames }}{%else%}<author></author>{%endif%} <date_cleanme='true'>{{i.date}}</date> {% for k in i.keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{i.abstract}}</abstract> </front> {% for u in i.uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in i.doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in i.authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{i.authoritative_identifier | join: ', '}}</refcontent> {% endif %}</ref-included>{% endfor %}"
|
23
|
+
standard: "{% if stream %}<stream>{{stream}}</stream>{% endif %} <front> <title>{{ title }}</title> {{ creatornames }} <date_cleanme='true'>{{date}}</date> {% for k in keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{abstract}}</abstract> </front> {% for u in uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{authoritative_identifier | join: ', '}}</refcontent> {% endif %} {% for i in included %}<ref-included target='{{ i.uris[0].content }}'> {% if i.stream %}<stream>{{i.stream}}</stream>{% endif %} <front> <title>{% if i.title %}{{ i.title}}{%else%}[TITLE]{%endif%}</title> {% if i.creatornames %}{{ i.creatornames }}{%else%}<author></author>{%endif%} <date_cleanme='true'>{{i.date}}</date> {% for k in i.keywords %}<keyword>{{k}}</keyword>{%endfor%} <abstract_cleanme='true'>{{i.abstract}}</abstract> </front> {% for u in i.uris %}<format_target='{{u.content}}'_type='{%if u.type%}{{u.type}}{%else%}HTML{%endif%}'/>{% endfor %} {{ series }} {%for d in i.doi %}<seriesInfo_value='{{ d | replace: ' ', ' ' | remove_first: 'DOI' | strip }}'_name='DOI'/>{% endfor %} {% if home_standard %}{% for j in i.authoritative_identifier %} <seriesInfo_value='{{ j | replace: ' ', ' ' | strip | split: ' ' | last | remove_first: 'I-D.'}}'_name='{%if j contains 'I-D.'%}Internet-Draft{% else %}{{ j | replace: ' ', ' ' | strip | split: ' ' | slice: -2 }}{%endif%}'/> {% endfor %} {% else %} <refcontent>{{i.authoritative_identifier | join: ', '}}</refcontent> {% endif %}</ref-included>{% endfor %}"
|
24
24
|
website: standard
|
25
25
|
book: standard
|
26
26
|
booklet: standard
|
data/lib/relaton/render/parse.rb
CHANGED
@@ -2,6 +2,11 @@ module Relaton
|
|
2
2
|
module Render
|
3
3
|
module Ietf
|
4
4
|
class Parse < ::Relaton::Render::Parse
|
5
|
+
def initialize(options)
|
6
|
+
super
|
7
|
+
@fieldsklass = Relaton::Render::Ietf::Fields
|
8
|
+
end
|
9
|
+
|
5
10
|
def simple_or_host_xml2hash(doc, host)
|
6
11
|
ret = super
|
7
12
|
ret.merge(home_standard: home_standard(doc, ret[:publisher_raw]),
|
@@ -88,12 +93,12 @@ module Relaton
|
|
88
93
|
super
|
89
94
|
end
|
90
95
|
|
91
|
-
# do not add BCP number, it is not included in IETF practice
|
92
96
|
def authoritative_identifier(doc)
|
93
97
|
ret = super
|
94
|
-
|
95
|
-
|
96
|
-
|
98
|
+
bcp = doc.series.detect do |s|
|
99
|
+
%w(BCP STD).include?(s.title.title.content)
|
100
|
+
end
|
101
|
+
bcp and ret.unshift("BCP #{bcp.number}")
|
97
102
|
ret.reject { |x| /^(rfc-anchor|Internet-Draft)/.match? (x) }
|
98
103
|
end
|
99
104
|
|
@@ -118,17 +123,18 @@ module Relaton
|
|
118
123
|
end
|
119
124
|
|
120
125
|
def included_xml2hash(doc)
|
121
|
-
r = doc.relation.select { |x| x.type == "includes" }
|
122
|
-
|
126
|
+
r = doc.relation.select { |x| x.type == "includes" }.map do |x|
|
127
|
+
parse_single_bibitem(x.bibitem)
|
128
|
+
end
|
123
129
|
r.empty? and return {}
|
124
130
|
{ included: r }
|
125
131
|
end
|
126
132
|
|
127
133
|
def parse_single_bibitem(doc)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
134
|
+
data = extract(doc)
|
135
|
+
# enhance_data(data, r.template_raw)
|
136
|
+
# data_liquid = @fieldsklass.new(renderer: self)
|
137
|
+
# .compound_fields_format(data)
|
132
138
|
end
|
133
139
|
end
|
134
140
|
end
|
data/metanorma-ietf.gemspec
CHANGED
@@ -37,9 +37,8 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
38
38
|
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
40
|
-
spec.add_dependency "metanorma-standoc", "~> 2.8.
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 2.8.4"
|
41
41
|
spec.add_dependency "relaton-render"
|
42
|
-
spec.add_dependency "vectory", "~> 0.6"
|
43
42
|
|
44
43
|
spec.add_development_dependency "debug"
|
45
44
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-ietf-data
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.8.
|
33
|
+
version: 2.8.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.8.
|
40
|
+
version: 2.8.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-render
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: vectory
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.6'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.6'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: debug
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|