metanorma-ietf 3.4.3 → 3.5.0
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 +4 -4
- data/lib/isodoc/ietf/inline.rb +11 -6
- data/lib/isodoc/ietf/reqt.rb +1 -1
- data/lib/isodoc/ietf/rfc_convert.rb +2 -1
- data/lib/isodoc/ietf/terms.rb +31 -1
- data/lib/metanorma/ietf/biblio.rng +17 -9
- data/lib/metanorma/ietf/ietf.rng +28 -30
- data/lib/metanorma/ietf/isodoc.rng +12 -6
- data/lib/metanorma/ietf/version.rb +1 -1
- data/metanorma-ietf.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 390603e9e2284f8f9d4a296e2b2477145d68db6860bf89518bf12a38eaec4de6
|
4
|
+
data.tar.gz: ecb70e48ac54f68e4b486aafdc0af99792834dcedc781e94da78b88a75ddb0cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90f627b63a727c2a022db91718237058c8309b892bd39cbc5991685a8daa6362639503caf8cc06fd60eabcb0bb3b36a671fbd9d018e00e7fe41f11261b4f4fea
|
7
|
+
data.tar.gz: e6178e44010dbbddf74aa1b4120a3be44e1c24dc076577a70751a58e88cb7ebfa0b0cc9bf3a1b666776c7afb2b883516e00edc93099a14f7ac966039cfc0698e
|
data/lib/isodoc/ietf/inline.rb
CHANGED
@@ -37,6 +37,10 @@ module IsoDoc
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
def display_text_parse(node, out)
|
41
|
+
node.children.each { |n| parse(n, out) }
|
42
|
+
end
|
43
|
+
|
40
44
|
def strike_parse(node, out)
|
41
45
|
node.children.each { |n| parse(n, out) }
|
42
46
|
end
|
@@ -56,7 +60,7 @@ module IsoDoc
|
|
56
60
|
out << text
|
57
61
|
end
|
58
62
|
|
59
|
-
def
|
63
|
+
def semx_stem_parse(node, out)
|
60
64
|
stem = case node["type"]
|
61
65
|
when "MathML"
|
62
66
|
a = node.at(ns("./asciimath"))&.remove
|
@@ -78,7 +82,7 @@ module IsoDoc
|
|
78
82
|
|
79
83
|
def hr_parse(node, out); end
|
80
84
|
|
81
|
-
def
|
85
|
+
def semx_link_parse(node, out)
|
82
86
|
out.eref **attr_code(target: node["target"],
|
83
87
|
brackets: node["style"]) do |l|
|
84
88
|
node.children.each { |n| parse(n, l) }
|
@@ -115,7 +119,7 @@ module IsoDoc
|
|
115
119
|
end
|
116
120
|
end
|
117
121
|
|
118
|
-
def
|
122
|
+
def semx_xref_parse(node, out)
|
119
123
|
out.xref **attr_code(target: node["target"], format: node["format"],
|
120
124
|
relative: node["relative"]) do |l|
|
121
125
|
l << get_linkend(node)
|
@@ -127,12 +131,13 @@ module IsoDoc
|
|
127
131
|
%w{locality localityStack location}.include? c.name
|
128
132
|
end
|
129
133
|
contents = no_loc_contents.select { |c| !c.text? || /\S/.match(c) }
|
134
|
+
.map { |x| x.name == "display-text" ? x.children : x }.flatten
|
130
135
|
!contents.empty? and
|
131
136
|
return to_xml(Nokogiri::XML::NodeSet.new(node.document, contents))
|
132
137
|
""
|
133
138
|
end
|
134
139
|
|
135
|
-
def
|
140
|
+
def semx_eref_parse(node, out)
|
136
141
|
linkend = node.children.reject do |c|
|
137
142
|
%w{locality localityStack}.include? c.name
|
138
143
|
end
|
@@ -159,11 +164,11 @@ module IsoDoc
|
|
159
164
|
.sub(/^\s*(Sections?|Clauses?)/, "").strip.sub(/,$/, "")
|
160
165
|
end
|
161
166
|
|
162
|
-
def
|
167
|
+
def semx_origin_parse(node, out)
|
163
168
|
if t = node.at(ns("./termref"))
|
164
169
|
termrefelem_parse(t, out)
|
165
170
|
else
|
166
|
-
|
171
|
+
semx_eref_parse(node, out)
|
167
172
|
end
|
168
173
|
end
|
169
174
|
|
data/lib/isodoc/ietf/reqt.rb
CHANGED
@@ -66,7 +66,8 @@ module IsoDoc
|
|
66
66
|
case node.name
|
67
67
|
when "bcp14" then bcp14_parse(node, out)
|
68
68
|
when "concept" then concept_parse(node, out)
|
69
|
-
when "
|
69
|
+
when "display-text" then display_text_parse(node, out)
|
70
|
+
when "verbal-definition", "non-verbal-representation", "fmt-provision"
|
70
71
|
node.elements.each { |n| parse(n, out) }
|
71
72
|
else
|
72
73
|
text = node.to_xml.gsub(/</, "<").gsub(/>/, ">")
|
data/lib/isodoc/ietf/terms.rb
CHANGED
@@ -5,6 +5,10 @@ module IsoDoc
|
|
5
5
|
@termdomain = termdomain
|
6
6
|
end
|
7
7
|
|
8
|
+
def semx_definition_parse(node, out)
|
9
|
+
definition_parse(node, out)
|
10
|
+
end
|
11
|
+
|
8
12
|
def definition_parse(node, out)
|
9
13
|
node.children.each { |n| parse(n, out) }
|
10
14
|
end
|
@@ -15,6 +19,10 @@ module IsoDoc
|
|
15
19
|
para.children.each { |n| parse(n, out) }
|
16
20
|
end
|
17
21
|
|
22
|
+
def semx_deprecated_term_parse(node, out)
|
23
|
+
deprecated_term_parse(node, out)
|
24
|
+
end
|
25
|
+
|
18
26
|
def deprecated_term_parse(node, out)
|
19
27
|
name = node.at(ns(".//name"))
|
20
28
|
out.t do |p|
|
@@ -22,6 +30,10 @@ module IsoDoc
|
|
22
30
|
name.children.each { |c| parse(c, p) }
|
23
31
|
end
|
24
32
|
end
|
33
|
+
|
34
|
+
def semx_admitted_term_parse(node, out)
|
35
|
+
admitted_term_parse(node, out)
|
36
|
+
end
|
25
37
|
|
26
38
|
def admitted_term_parse(node, out)
|
27
39
|
name = node.at(ns(".//name"))
|
@@ -30,6 +42,10 @@ module IsoDoc
|
|
30
42
|
end
|
31
43
|
end
|
32
44
|
|
45
|
+
def semx_term_parse(node, out)
|
46
|
+
term_parse(node, out)
|
47
|
+
end
|
48
|
+
|
33
49
|
def term_parse(node, out)
|
34
50
|
if domain = node.at(ns("./domain"))
|
35
51
|
set_termdomain(domain.text)
|
@@ -53,10 +69,20 @@ module IsoDoc
|
|
53
69
|
set_termdomain("")
|
54
70
|
end
|
55
71
|
node.xpath(ns("./definition")).size > 1 and
|
56
|
-
|
72
|
+
multidef(node)
|
57
73
|
clause_parse(node, out)
|
58
74
|
end
|
59
75
|
|
76
|
+
def multidef(elem)
|
77
|
+
d = elem.at(ns("./definition"))
|
78
|
+
d = d.replace("<ol><li>#{to_xml(d.children)}</li></ol>").first
|
79
|
+
elem.xpath(ns("./definition")).each do |f|
|
80
|
+
f = f.replace("<li>#{to_xml(f.children)}</li>").first
|
81
|
+
d << f
|
82
|
+
end
|
83
|
+
d.wrap("<definition></definition>")
|
84
|
+
end
|
85
|
+
|
60
86
|
def termdocsource_parse(_node, _out); end
|
61
87
|
|
62
88
|
def concept_parse(node, out)
|
@@ -106,6 +132,10 @@ module IsoDoc
|
|
106
132
|
end
|
107
133
|
end
|
108
134
|
|
135
|
+
def semx_termref_parse(node, out)
|
136
|
+
termref_parse(node, out)
|
137
|
+
end
|
138
|
+
|
109
139
|
def termref_parse(elem, out)
|
110
140
|
preprocess_termref(elem)
|
111
141
|
elem.children = l10n("[#{@i18n.source}: #{to_xml(elem.children).strip}]")
|
@@ -267,11 +267,11 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
267
267
|
<a:documentation>An identifier of the person according to an international identifier scheme</a:documentation>
|
268
268
|
</ref>
|
269
269
|
</zeroOrMore>
|
270
|
-
<
|
270
|
+
<optional>
|
271
271
|
<ref name="contact">
|
272
272
|
<a:documentation>Contact information for the person, including URI, address, phone number, and email</a:documentation>
|
273
273
|
</ref>
|
274
|
-
</
|
274
|
+
</optional>
|
275
275
|
</element>
|
276
276
|
</define>
|
277
277
|
<define name="fullname">
|
@@ -454,11 +454,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
454
454
|
<a:documentation>An identifier of the organization according to an international identifier scheme</a:documentation>
|
455
455
|
</ref>
|
456
456
|
</zeroOrMore>
|
457
|
-
<
|
457
|
+
<optional>
|
458
458
|
<ref name="contact">
|
459
459
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
460
460
|
</ref>
|
461
|
-
</
|
461
|
+
</optional>
|
462
462
|
<optional>
|
463
463
|
<ref name="logo">
|
464
464
|
<a:documentation>A logo for the organization</a:documentation>
|
@@ -540,12 +540,18 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
540
540
|
<!-- TODO may change -->
|
541
541
|
<define name="contact">
|
542
542
|
<a:documentation>Contact information for a person or organization</a:documentation>
|
543
|
-
<
|
543
|
+
<zeroOrMore>
|
544
544
|
<ref name="address"/>
|
545
|
+
</zeroOrMore>
|
546
|
+
<zeroOrMore>
|
545
547
|
<ref name="phone"/>
|
548
|
+
</zeroOrMore>
|
549
|
+
<zeroOrMore>
|
546
550
|
<ref name="email"/>
|
551
|
+
</zeroOrMore>
|
552
|
+
<zeroOrMore>
|
547
553
|
<ref name="uri"/>
|
548
|
-
</
|
554
|
+
</zeroOrMore>
|
549
555
|
</define>
|
550
556
|
<define name="phone">
|
551
557
|
<a:documentation>The phone number associated with a person or organization</a:documentation>
|
@@ -941,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
|
|
941
947
|
typically cited as "personal communication")</a:documentation>
|
942
948
|
<value>conversation</value>
|
943
949
|
<a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
|
950
|
+
<value>collection</value>
|
951
|
+
<a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
|
944
952
|
<value>misc</value>
|
945
953
|
<a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
|
946
954
|
</choice>
|
@@ -1271,17 +1279,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
1271
1279
|
</define>
|
1272
1280
|
<define name="validityBegins">
|
1273
1281
|
<element name="validityBegins">
|
1274
|
-
<ref name="
|
1282
|
+
<ref name="ISO8601Date"/>
|
1275
1283
|
</element>
|
1276
1284
|
</define>
|
1277
1285
|
<define name="validityEnds">
|
1278
1286
|
<element name="validityEnds">
|
1279
|
-
<ref name="
|
1287
|
+
<ref name="ISO8601Date"/>
|
1280
1288
|
</element>
|
1281
1289
|
</define>
|
1282
1290
|
<define name="validityRevision">
|
1283
1291
|
<element name="revision">
|
1284
|
-
<ref name="
|
1292
|
+
<ref name="ISO8601Date"/>
|
1285
1293
|
</element>
|
1286
1294
|
</define>
|
1287
1295
|
<define name="TypedTitleString">
|
data/lib/metanorma/ietf/ietf.rng
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns='https://www.metanorma.org/ns/
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
3
|
<!--
|
4
4
|
VERSION v1.2.1
|
5
5
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
@@ -8,9 +8,6 @@
|
|
8
8
|
-->
|
9
9
|
<include href="relaton-ietf.rng"/>
|
10
10
|
<include href="isodoc.rng">
|
11
|
-
<start>
|
12
|
-
<ref name="ietf-standard"/>
|
13
|
-
</start>
|
14
11
|
<define name="ParagraphAttrs">
|
15
12
|
<optional>
|
16
13
|
<attribute name="align">
|
@@ -382,7 +379,34 @@
|
|
382
379
|
</optional>
|
383
380
|
</element>
|
384
381
|
</define>
|
382
|
+
<define name="standard-document">
|
383
|
+
<element name="metanorma">
|
384
|
+
<ref name="Root-Attributes"/>
|
385
|
+
<ref name="bibdata"/>
|
386
|
+
<zeroOrMore>
|
387
|
+
<ref name="termdocsource"/>
|
388
|
+
</zeroOrMore>
|
389
|
+
<optional>
|
390
|
+
<ref name="misccontainer"/>
|
391
|
+
</optional>
|
392
|
+
<optional>
|
393
|
+
<ref name="boilerplate"/>
|
394
|
+
</optional>
|
395
|
+
<ref name="preface"/>
|
396
|
+
<oneOrMore>
|
397
|
+
<ref name="sections"/>
|
398
|
+
</oneOrMore>
|
399
|
+
<zeroOrMore>
|
400
|
+
<ref name="annex"/>
|
401
|
+
</zeroOrMore>
|
402
|
+
<ref name="bibliography"/>
|
403
|
+
<zeroOrMore>
|
404
|
+
<ref name="indexsect"/>
|
405
|
+
</zeroOrMore>
|
406
|
+
</element>
|
407
|
+
</define>
|
385
408
|
</include>
|
409
|
+
<!-- end overrides -->
|
386
410
|
<define name="TextElement" combine="choice">
|
387
411
|
<choice>
|
388
412
|
<ref name="bcp14"/>
|
@@ -438,30 +462,4 @@
|
|
438
462
|
</optional>
|
439
463
|
<text/>
|
440
464
|
</define>
|
441
|
-
<define name="ietf-standard">
|
442
|
-
<element name="ietf-standard">
|
443
|
-
<ref name="Root-Attributes"/>
|
444
|
-
<ref name="bibdata"/>
|
445
|
-
<zeroOrMore>
|
446
|
-
<ref name="termdocsource"/>
|
447
|
-
</zeroOrMore>
|
448
|
-
<optional>
|
449
|
-
<ref name="misccontainer"/>
|
450
|
-
</optional>
|
451
|
-
<optional>
|
452
|
-
<ref name="boilerplate"/>
|
453
|
-
</optional>
|
454
|
-
<ref name="preface"/>
|
455
|
-
<oneOrMore>
|
456
|
-
<ref name="sections"/>
|
457
|
-
</oneOrMore>
|
458
|
-
<zeroOrMore>
|
459
|
-
<ref name="annex"/>
|
460
|
-
</zeroOrMore>
|
461
|
-
<ref name="bibliography"/>
|
462
|
-
<zeroOrMore>
|
463
|
-
<ref name="indexsect"/>
|
464
|
-
</zeroOrMore>
|
465
|
-
</element>
|
466
|
-
</define>
|
467
465
|
</grammar>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION
|
20
|
+
<!-- VERSION v2.0.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -459,11 +459,14 @@ gives an explicit page orientation</a:documentation>
|
|
459
459
|
<a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
|
460
460
|
</ref>
|
461
461
|
</zeroOrMore>
|
462
|
-
<
|
463
|
-
<
|
462
|
+
<optional>
|
463
|
+
<element name="display-text">
|
464
464
|
<a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `<xx>my link text</xx>`)</a:documentation>
|
465
|
-
|
466
|
-
|
465
|
+
<oneOrMore>
|
466
|
+
<ref name="PureTextElement"/>
|
467
|
+
</oneOrMore>
|
468
|
+
</element>
|
469
|
+
</optional>
|
467
470
|
</define>
|
468
471
|
</include>
|
469
472
|
<!-- end overrides -->
|
@@ -1205,10 +1208,13 @@ numbers</a:documentation>
|
|
1205
1208
|
<value>presentation</value>
|
1206
1209
|
</choice>
|
1207
1210
|
</attribute>
|
1211
|
+
<attribute name="flavor">
|
1212
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
|
1213
|
+
</attribute>
|
1208
1214
|
</define>
|
1209
1215
|
<define name="standard-document">
|
1210
1216
|
<a:documentation>Representation of a standardisation document</a:documentation>
|
1211
|
-
<element name="
|
1217
|
+
<element name="metanorma">
|
1212
1218
|
<ref name="Root-Attributes"/>
|
1213
1219
|
<ref name="bibdata">
|
1214
1220
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
data/metanorma-ietf.gemspec
CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
38
38
|
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
40
|
-
spec.add_dependency "metanorma-standoc", "~>
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 3.0.0"
|
41
41
|
spec.add_dependency "relaton-render"
|
42
42
|
|
43
43
|
spec.add_development_dependency "debug"
|
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.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-17 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:
|
33
|
+
version: 3.0.0
|
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:
|
40
|
+
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: relaton-render
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -298,7 +298,7 @@ homepage: https://github.com/metanorma/metanorma-ietf
|
|
298
298
|
licenses:
|
299
299
|
- BSD-2-Clause
|
300
300
|
metadata: {}
|
301
|
-
post_install_message:
|
301
|
+
post_install_message:
|
302
302
|
rdoc_options: []
|
303
303
|
require_paths:
|
304
304
|
- lib
|
@@ -314,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
314
314
|
version: '0'
|
315
315
|
requirements: []
|
316
316
|
rubygems_version: 3.3.27
|
317
|
-
signing_key:
|
317
|
+
signing_key:
|
318
318
|
specification_version: 4
|
319
319
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|
320
320
|
RFCs, in AsciiDoc.
|