metanorma-ietf 3.5.2 → 3.5.4
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/blocks.rb +1 -1
- data/lib/isodoc/ietf/cleanup.rb +1 -1
- data/lib/isodoc/ietf/cleanup_inline.rb +18 -2
- data/lib/isodoc/ietf/section.rb +8 -5
- data/lib/metanorma/ietf/basicdoc.rng +48 -35
- data/lib/metanorma/ietf/biblio-standoc.rng +37 -7
- data/lib/metanorma/ietf/biblio.rng +30 -18
- data/lib/metanorma/ietf/cleanup.rb +14 -3
- data/lib/metanorma/ietf/ietf.rng +19 -141
- data/lib/metanorma/ietf/isodoc.rng +126 -80
- data/lib/metanorma/ietf/relaton-ietf.rng +70 -61
- data/lib/metanorma/ietf/reqt.rng +7 -6
- data/lib/metanorma/ietf/validate.rb +5 -8
- data/lib/metanorma/ietf/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d6ea179af9c4c095b3e4cb4481ee8cfe136d370e10df652b025c99dd61018f
|
4
|
+
data.tar.gz: 980f41496222a49f993ad5c12aa83fab68e192787ee93b1995631be4f5af29f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69381efde5d13a2b9453e94ab74d7557fc938295d88cde9b8db80e5229ce306f1c61b90f23887c985dc28e0f61ee2556b96353b6f475a1941a11366800e667d3
|
7
|
+
data.tar.gz: b03c83fe7b56285eb7ce5884861837274824d3a7bf9d1d5dfb474e1cf8e39a355c3059b293ee311f8c4571f0a53e64f8074e91bae901d87853f8efe4819f2094
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
@@ -164,7 +164,7 @@ module IsoDoc
|
|
164
164
|
|
165
165
|
def review_note_parse(node, out)
|
166
166
|
out.cref **attr_code(anchor: node["id"], display: node["display"],
|
167
|
-
source: node["reviewer"]) do |c|
|
167
|
+
source: node["reviewer"], from: node["from"]) do |c|
|
168
168
|
if name = node.at(ns("./name"))
|
169
169
|
name.children.each { |n| parse(n, c) }
|
170
170
|
c << " "
|
data/lib/isodoc/ietf/cleanup.rb
CHANGED
@@ -12,8 +12,8 @@ module IsoDoc
|
|
12
12
|
sourcecode_cleanup(docxml)
|
13
13
|
li_cleanup(docxml)
|
14
14
|
deflist_cleanup(docxml)
|
15
|
+
cref_cleanup(docxml) # feeds bookmark
|
15
16
|
bookmark_cleanup(docxml)
|
16
|
-
cref_cleanup(docxml)
|
17
17
|
front_cleanup(docxml)
|
18
18
|
u_cleanup(docxml)
|
19
19
|
biblio_cleanup(docxml) # feeds aside
|
@@ -62,12 +62,28 @@ module IsoDoc
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def cref_cleanup(docxml)
|
65
|
+
cref_move(docxml)
|
66
|
+
cref_unwrap(docxml)
|
67
|
+
end
|
68
|
+
|
69
|
+
# do not remove bookmarks until this is done,
|
70
|
+
# bookmarks can be cref destination
|
71
|
+
def cref_move(docxml)
|
72
|
+
docxml.xpath("//cref[@from]").each do |c|
|
73
|
+
dest = docxml.at("//*[@anchor = '#{c['from']}']")
|
74
|
+
t = dest.at(".//text()[not(ancestor::cref)]") and dest = t
|
75
|
+
c.delete("from")
|
76
|
+
c.delete("to")
|
77
|
+
dest.previous = c
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def cref_unwrap(docxml)
|
65
82
|
docxml.xpath("//cref").each do |c|
|
66
83
|
c.xpath("./t").each do |t|
|
67
84
|
t.replace(t.children)
|
68
85
|
end
|
69
|
-
|
70
|
-
|
86
|
+
%w(section abstract).include? c.parent.name or next
|
71
87
|
c.wrap("<t></t>")
|
72
88
|
end
|
73
89
|
end
|
data/lib/isodoc/ietf/section.rb
CHANGED
@@ -133,6 +133,7 @@ module IsoDoc
|
|
133
133
|
out.back do |back|
|
134
134
|
bibliography isoxml, back
|
135
135
|
annex isoxml, back
|
136
|
+
comments isoxml, back
|
136
137
|
end
|
137
138
|
end
|
138
139
|
|
@@ -145,8 +146,7 @@ module IsoDoc
|
|
145
146
|
end
|
146
147
|
|
147
148
|
def clause_parse(node, out)
|
148
|
-
|
149
|
-
|
149
|
+
node.at(ns(".//references")) and return
|
150
150
|
out.section **attr_code(
|
151
151
|
anchor: node["id"], numbered: node["numbered"],
|
152
152
|
removeInRFC: node["removeInRFC"], toc: node["toc"]
|
@@ -162,9 +162,6 @@ module IsoDoc
|
|
162
162
|
isoxml.xpath("//xmlns:preface/child::*" \
|
163
163
|
"[not(name() = 'abstract' or name() = 'foreword')] " \
|
164
164
|
"| //xmlns:sections/child::*").each do |c|
|
165
|
-
# cdup = c.dup
|
166
|
-
# cdup.xpath(ns(".//references")).each { |r| r.remove }
|
167
|
-
# cdup.at("./*[local-name() != 'title'][normalize-space(text()) != '']") or next
|
168
165
|
clause_parse(c, out)
|
169
166
|
end
|
170
167
|
end
|
@@ -174,6 +171,12 @@ module IsoDoc
|
|
174
171
|
clause_parse(c, out)
|
175
172
|
end
|
176
173
|
end
|
174
|
+
|
175
|
+
def comments(isoxml, out)
|
176
|
+
isoxml.xpath(ns("//review")).each do |c|
|
177
|
+
review_note_parse(c, out)
|
178
|
+
end
|
179
|
+
end
|
177
180
|
end
|
178
181
|
end
|
179
182
|
end
|
@@ -382,33 +382,7 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
382
382
|
<a:documentation>Block intended to capture reviewer comments about some text in the document</a:documentation>
|
383
383
|
<element name="review">
|
384
384
|
<ref name="RequiredId"/>
|
385
|
-
<
|
386
|
-
<a:documentation>The party who has offered the comment</a:documentation>
|
387
|
-
</attribute>
|
388
|
-
<optional>
|
389
|
-
<attribute name="type">
|
390
|
-
<a:documentation>The type of reviewer comment</a:documentation>
|
391
|
-
</attribute>
|
392
|
-
</optional>
|
393
|
-
<optional>
|
394
|
-
<attribute name="date">
|
395
|
-
<a:documentation>The date when the comment was made</a:documentation>
|
396
|
-
<data type="dateTime"/>
|
397
|
-
</attribute>
|
398
|
-
</optional>
|
399
|
-
<optional>
|
400
|
-
<attribute name="from">
|
401
|
-
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
402
|
-
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
403
|
-
<data type="IDREF"/>
|
404
|
-
</attribute>
|
405
|
-
</optional>
|
406
|
-
<optional>
|
407
|
-
<attribute name="to">
|
408
|
-
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
409
|
-
<data type="IDREF"/>
|
410
|
-
</attribute>
|
411
|
-
</optional>
|
385
|
+
<ref name="ReviewAttributes"/>
|
412
386
|
<oneOrMore>
|
413
387
|
<ref name="paragraph">
|
414
388
|
<a:documentation>Reviewer comments content</a:documentation>
|
@@ -416,6 +390,35 @@ If not provided, the comment applies in the vicinity of the place it has been in
|
|
416
390
|
</oneOrMore>
|
417
391
|
</element>
|
418
392
|
</define>
|
393
|
+
<define name="ReviewAttributes">
|
394
|
+
<attribute name="reviewer">
|
395
|
+
<a:documentation>The party who has offered the comment</a:documentation>
|
396
|
+
</attribute>
|
397
|
+
<optional>
|
398
|
+
<attribute name="type">
|
399
|
+
<a:documentation>The type of reviewer comment</a:documentation>
|
400
|
+
</attribute>
|
401
|
+
</optional>
|
402
|
+
<optional>
|
403
|
+
<attribute name="date">
|
404
|
+
<a:documentation>The date when the comment was made</a:documentation>
|
405
|
+
<data type="dateTime"/>
|
406
|
+
</attribute>
|
407
|
+
</optional>
|
408
|
+
<optional>
|
409
|
+
<attribute name="from">
|
410
|
+
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
|
+
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
+
<data type="IDREF"/>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="to">
|
417
|
+
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
+
<data type="IDREF"/>
|
419
|
+
</attribute>
|
420
|
+
</optional>
|
421
|
+
</define>
|
419
422
|
<define name="NumberingAttributes">
|
420
423
|
<optional>
|
421
424
|
<attribute name="unnumbered">
|
@@ -857,6 +860,7 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
857
860
|
<define name="tr">
|
858
861
|
<a:documentation>Sequence of cells to be displayed as a row in a table</a:documentation>
|
859
862
|
<element name="tr">
|
863
|
+
<ref name="TrAttributes"/>
|
860
864
|
<oneOrMore>
|
861
865
|
<choice>
|
862
866
|
<ref name="td">
|
@@ -869,6 +873,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
869
873
|
</oneOrMore>
|
870
874
|
</element>
|
871
875
|
</define>
|
876
|
+
<define name="TrAttributes">
|
877
|
+
<empty/>
|
878
|
+
</define>
|
872
879
|
<define name="tr-no-id">
|
873
880
|
<a:documentation>Sequence of cells to be displayed as a row in a table: optional ID attributes recursively (for use in Relaton, metadata)</a:documentation>
|
874
881
|
<element name="tr">
|
@@ -1694,16 +1701,22 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1694
1701
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
1695
1702
|
The target of a footnote is the location it is embedded in within the text</a:documentation>
|
1696
1703
|
<element name="fn">
|
1697
|
-
<
|
1698
|
-
|
1699
|
-
</attribute>
|
1700
|
-
<oneOrMore>
|
1701
|
-
<ref name="paragraph">
|
1702
|
-
<a:documentation>The content of the footnote</a:documentation>
|
1703
|
-
</ref>
|
1704
|
-
</oneOrMore>
|
1704
|
+
<ref name="FnAttributes"/>
|
1705
|
+
<ref name="FnBody"/>
|
1705
1706
|
</element>
|
1706
1707
|
</define>
|
1708
|
+
<define name="FnBody">
|
1709
|
+
<oneOrMore>
|
1710
|
+
<ref name="paragraph">
|
1711
|
+
<a:documentation>The content of the footnote</a:documentation>
|
1712
|
+
</ref>
|
1713
|
+
</oneOrMore>
|
1714
|
+
</define>
|
1715
|
+
<define name="FnAttributes">
|
1716
|
+
<attribute name="reference">
|
1717
|
+
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
1718
|
+
</attribute>
|
1719
|
+
</define>
|
1707
1720
|
<define name="callout">
|
1708
1721
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as annotation of source code</a:documentation>
|
1709
1722
|
<element name="callout">
|
@@ -1,13 +1,14 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
-
<!--
|
4
|
-
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
-
of relaton
|
6
|
-
|
7
|
-
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
-
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
-
-->
|
10
3
|
<include href="biblio.rng">
|
4
|
+
<!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
|
5
|
+
<!--
|
6
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
7
|
+
of relaton
|
8
|
+
|
9
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
10
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
11
|
+
-->
|
11
12
|
<define name="BibData">
|
12
13
|
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
13
14
|
<ref name="StandardBibliographicItem"/>
|
@@ -91,6 +92,9 @@ a standards definition organization</a:documentation>
|
|
91
92
|
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
92
93
|
</ref>
|
93
94
|
</zeroOrMore>
|
95
|
+
<ref name="DocumentImages">
|
96
|
+
<a:documentation>Coverpage and other images to be rendered with document</a:documentation>
|
97
|
+
</ref>
|
94
98
|
</define>
|
95
99
|
<define name="doctype">
|
96
100
|
<a:documentation>Classification of the standardisation document</a:documentation>
|
@@ -268,6 +272,32 @@ and not those document components</a:documentation>
|
|
268
272
|
</optional>
|
269
273
|
</element>
|
270
274
|
</define>
|
275
|
+
<define name="DocumentImages">
|
276
|
+
<zeroOrMore>
|
277
|
+
<element name="coverpage-image">
|
278
|
+
<a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
|
279
|
+
<ref name="image-no-id"/>
|
280
|
+
</element>
|
281
|
+
</zeroOrMore>
|
282
|
+
<zeroOrMore>
|
283
|
+
<element name="innercoverpage-image">
|
284
|
+
<a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
|
285
|
+
<ref name="image-no-id"/>
|
286
|
+
</element>
|
287
|
+
</zeroOrMore>
|
288
|
+
<zeroOrMore>
|
289
|
+
<element name="tocside-image">
|
290
|
+
<a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
|
291
|
+
<ref name="image-no-id"/>
|
292
|
+
</element>
|
293
|
+
</zeroOrMore>
|
294
|
+
<zeroOrMore>
|
295
|
+
<element name="backpage-image">
|
296
|
+
<a:documentation>Images to be displayed on the backpage of the document</a:documentation>
|
297
|
+
<ref name="image-no-id"/>
|
298
|
+
</element>
|
299
|
+
</zeroOrMore>
|
300
|
+
</define>
|
271
301
|
<define name="StandardBibliographicItem">
|
272
302
|
<ref name="BibliographicItem"/>
|
273
303
|
<zeroOrMore>
|
@@ -1,23 +1,25 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!--
|
3
|
-
instantiations of this grammar may replace leaf strings
|
4
|
-
with more elaborated types; e.g. title (text) replaced with
|
5
|
-
title-main, title-intro, title-part; type replaced with
|
6
|
-
enum.
|
7
|
-
|
8
|
-
some renaming at leaf nodes is permissible
|
9
|
-
|
10
|
-
obligations can change both from optional to mandatory,
|
11
|
-
and from mandatory to optional; optional elements may
|
12
|
-
be omitted; freely positioned alternatives may be replaced
|
13
|
-
with strict ordering
|
14
|
-
|
15
|
-
DO NOT introduce a namespace here. We do not want a distinct namespace
|
16
|
-
for these elements, and a distinct namespace for any grammar inheriting
|
17
|
-
these elements; we just want one namespace for any child grammars
|
18
|
-
of this.
|
19
|
-
-->
|
20
2
|
<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">
|
3
|
+
<!--
|
4
|
+
ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix
|
5
|
+
|
6
|
+
Instantiations of this grammar may replace leaf strings
|
7
|
+
with more elaborated types; e.g. title (text) replaced with
|
8
|
+
title-main, title-intro, title-part; type replaced with
|
9
|
+
enum.
|
10
|
+
|
11
|
+
Some renaming at leaf nodes is permissible
|
12
|
+
|
13
|
+
Obligations can change both from optional to mandatory,
|
14
|
+
and from mandatory to optional; optional elements may
|
15
|
+
be omitted; freely positioned alternatives may be replaced
|
16
|
+
with strict ordering
|
17
|
+
|
18
|
+
DO NOT introduce a namespace here. We do not want a distinct namespace
|
19
|
+
for these elements, and a distinct namespace for any grammar inheriting
|
20
|
+
these elements; we just want one namespace for any child grammars
|
21
|
+
of this.
|
22
|
+
-->
|
21
23
|
<!--
|
22
24
|
https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
|
23
25
|
iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
|
@@ -1241,6 +1243,11 @@ Refer to `BibliographicItem` for definitions</a:documentation>
|
|
1241
1243
|
</define>
|
1242
1244
|
<define name="formattedref">
|
1243
1245
|
<element name="formattedref">
|
1246
|
+
<optional>
|
1247
|
+
<attribute name="format">
|
1248
|
+
<a:documentation>format of formatted reference; Metanorma assumes references are formatted as Metanorma XML</a:documentation>
|
1249
|
+
</attribute>
|
1250
|
+
</optional>
|
1244
1251
|
<oneOrMore>
|
1245
1252
|
<ref name="TextElement"/>
|
1246
1253
|
</oneOrMore>
|
@@ -1812,6 +1819,11 @@ May be used to differentiate rendering of notes in bibliographies</a:documentati
|
|
1812
1819
|
<a:documentation>Abstract of bibliographic item</a:documentation>
|
1813
1820
|
<element name="abstract">
|
1814
1821
|
<ref name="LocalizedStringAttributes"/>
|
1822
|
+
<optional>
|
1823
|
+
<attribute name="format">
|
1824
|
+
<a:documentation>What format the formatted abstract is in. In Metanorma, assumed to be Metanorma XML</a:documentation>
|
1825
|
+
</attribute>
|
1826
|
+
</optional>
|
1815
1827
|
<choice>
|
1816
1828
|
<oneOrMore>
|
1817
1829
|
<ref name="BasicBlockNoId">
|
@@ -6,9 +6,17 @@ module Metanorma
|
|
6
6
|
abstract_cleanup(xmldoc)
|
7
7
|
super
|
8
8
|
cref_cleanup(xmldoc)
|
9
|
+
dt_cleanup(xmldoc)
|
9
10
|
xmldoc
|
10
11
|
end
|
11
12
|
|
13
|
+
def dt_cleanup(xmldoc)
|
14
|
+
xmldoc.xpath("//dt").each do |dt|
|
15
|
+
/:$/.match?(dt.text.strip) and next
|
16
|
+
dt << ":"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
12
20
|
def abstract_cleanup(xmldoc)
|
13
21
|
xmldoc.xpath("//abstract[not(text())]").each do |x|
|
14
22
|
x.remove
|
@@ -19,7 +27,10 @@ module Metanorma
|
|
19
27
|
def cref_cleanup(xmldoc)
|
20
28
|
xmldoc.xpath("//crefref").each do |r|
|
21
29
|
if c = xmldoc.at("//review[@id = '#{r.text}']")
|
22
|
-
|
30
|
+
id = "_#{UUIDTools::UUID.random_create}"
|
31
|
+
c["from"] = id
|
32
|
+
c["to"] = id
|
33
|
+
r.replace("<bookmark id='#{id}'/>")
|
23
34
|
else
|
24
35
|
@log.add("Crossrefences", r,
|
25
36
|
"No matching review for cref:[#{r.text}]", severity: 1)
|
@@ -43,8 +54,7 @@ module Metanorma
|
|
43
54
|
|
44
55
|
def smartquotes_cleanup(xmldoc)
|
45
56
|
xmldoc.traverse do |n|
|
46
|
-
|
47
|
-
|
57
|
+
n.text? or next
|
48
58
|
n.replace(HTMLEntities.new.encode(
|
49
59
|
n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'")
|
50
60
|
.gsub(/\u201c|\u201d|\u201e|\u201f/, '"')
|
@@ -85,6 +95,7 @@ module Metanorma
|
|
85
95
|
def section_names_refs_cleanup(xml); end
|
86
96
|
|
87
97
|
def note_cleanup(xmldoc); end
|
98
|
+
|
88
99
|
end
|
89
100
|
end
|
90
101
|
end
|
data/lib/metanorma/ietf/ietf.rng
CHANGED
@@ -1,14 +1,8 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
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
|
-
<!--
|
4
|
-
VERSION v1.2.1
|
5
|
-
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
6
|
-
we cannot have a new default namespace: we will end up with a grammar with two different
|
7
|
-
namespaces, one for isostandard and one for ietf additions. And we do not want that.
|
8
|
-
-->
|
9
3
|
<include href="relaton-ietf.rng"/>
|
10
4
|
<include href="isodoc.rng">
|
11
|
-
<define name="
|
5
|
+
<define name="ParagraphAttributes">
|
12
6
|
<optional>
|
13
7
|
<attribute name="align">
|
14
8
|
<ref name="Alignments"/>
|
@@ -28,7 +22,7 @@
|
|
28
22
|
<attribute name="indent"/>
|
29
23
|
</optional>
|
30
24
|
</define>
|
31
|
-
<define name="
|
25
|
+
<define name="UlAttributes">
|
32
26
|
<optional>
|
33
27
|
<attribute name="nobullet">
|
34
28
|
<data type="boolean"/>
|
@@ -54,7 +48,7 @@
|
|
54
48
|
<ref name="note"/>
|
55
49
|
</zeroOrMore>
|
56
50
|
</define>
|
57
|
-
<define name="
|
51
|
+
<define name="OlAttributes">
|
58
52
|
<attribute name="type">
|
59
53
|
<choice>
|
60
54
|
<value>roman</value>
|
@@ -86,7 +80,7 @@
|
|
86
80
|
<ref name="note"/>
|
87
81
|
</zeroOrMore>
|
88
82
|
</define>
|
89
|
-
<define name="
|
83
|
+
<define name="DlAttributes">
|
90
84
|
<optional>
|
91
85
|
<attribute name="newline"/>
|
92
86
|
</optional>
|
@@ -106,34 +100,12 @@
|
|
106
100
|
<ref name="note"/>
|
107
101
|
</zeroOrMore>
|
108
102
|
</define>
|
109
|
-
<define name="
|
110
|
-
<
|
111
|
-
<attribute name="
|
112
|
-
|
113
|
-
</attribute>
|
114
|
-
<attribute name="reviewer"/>
|
115
|
-
<optional>
|
116
|
-
<attribute name="date">
|
117
|
-
<data type="dateTime"/>
|
118
|
-
</attribute>
|
119
|
-
</optional>
|
120
|
-
<attribute name="from">
|
121
|
-
<data type="IDREF"/>
|
122
|
-
</attribute>
|
123
|
-
<optional>
|
124
|
-
<attribute name="to">
|
125
|
-
<data type="IDREF"/>
|
126
|
-
</attribute>
|
127
|
-
</optional>
|
128
|
-
<optional>
|
129
|
-
<attribute name="display"/>
|
130
|
-
</optional>
|
131
|
-
<oneOrMore>
|
132
|
-
<ref name="paragraph"/>
|
133
|
-
</oneOrMore>
|
134
|
-
</element>
|
103
|
+
<define name="ReviewAttributes" combine="interleave">
|
104
|
+
<optional>
|
105
|
+
<attribute name="display"/>
|
106
|
+
</optional>
|
135
107
|
</define>
|
136
|
-
<define name="
|
108
|
+
<define name="NoteAttributes">
|
137
109
|
<optional>
|
138
110
|
<attribute name="removeInRFC"/>
|
139
111
|
</optional>
|
@@ -146,7 +118,7 @@
|
|
146
118
|
<ref name="paragraph"/>
|
147
119
|
</oneOrMore>
|
148
120
|
</define>
|
149
|
-
<define name="
|
121
|
+
<define name="PreAttributes">
|
150
122
|
<optional>
|
151
123
|
<attribute name="alt"/>
|
152
124
|
</optional>
|
@@ -154,12 +126,12 @@
|
|
154
126
|
<attribute name="align"/>
|
155
127
|
</optional>
|
156
128
|
</define>
|
157
|
-
<define name="
|
129
|
+
<define name="ImageAttributes" combine="interleave">
|
158
130
|
<optional>
|
159
131
|
<attribute name="align"/>
|
160
132
|
</optional>
|
161
133
|
</define>
|
162
|
-
<define name="
|
134
|
+
<define name="SourceAttributes" combine="interleave">
|
163
135
|
<optional>
|
164
136
|
<attribute name="number"/>
|
165
137
|
</optional>
|
@@ -213,7 +185,7 @@
|
|
213
185
|
<ref name="erefTypeURI"/>
|
214
186
|
</element>
|
215
187
|
</define>
|
216
|
-
<define name="
|
188
|
+
<define name="TableAttributes" combine="interleave">
|
217
189
|
<optional>
|
218
190
|
<attribute name="number"/>
|
219
191
|
</optional>
|
@@ -225,17 +197,7 @@
|
|
225
197
|
</optional>
|
226
198
|
</define>
|
227
199
|
<define name="Clause-Section">
|
228
|
-
<
|
229
|
-
<attribute name="id">
|
230
|
-
<data type="ID"/>
|
231
|
-
</attribute>
|
232
|
-
</optional>
|
233
|
-
<optional>
|
234
|
-
<attribute name="language"/>
|
235
|
-
</optional>
|
236
|
-
<optional>
|
237
|
-
<attribute name="script"/>
|
238
|
-
</optional>
|
200
|
+
<ref name="Section-Attributes"/>
|
239
201
|
<optional>
|
240
202
|
<attribute name="numbered"/>
|
241
203
|
</optional>
|
@@ -245,17 +207,6 @@
|
|
245
207
|
<optional>
|
246
208
|
<attribute name="toc"/>
|
247
209
|
</optional>
|
248
|
-
<optional>
|
249
|
-
<attribute name="inline-header">
|
250
|
-
<data type="boolean"/>
|
251
|
-
</attribute>
|
252
|
-
</optional>
|
253
|
-
<attribute name="obligation">
|
254
|
-
<choice>
|
255
|
-
<value>normative</value>
|
256
|
-
<value>informative</value>
|
257
|
-
</choice>
|
258
|
-
</attribute>
|
259
210
|
<optional>
|
260
211
|
<ref name="section-title"/>
|
261
212
|
</optional>
|
@@ -274,23 +225,7 @@
|
|
274
225
|
</define>
|
275
226
|
<define name="annex">
|
276
227
|
<element name="annex">
|
277
|
-
<
|
278
|
-
<attribute name="id">
|
279
|
-
<data type="ID"/>
|
280
|
-
</attribute>
|
281
|
-
</optional>
|
282
|
-
<optional>
|
283
|
-
<attribute name="language"/>
|
284
|
-
</optional>
|
285
|
-
<optional>
|
286
|
-
<attribute name="script"/>
|
287
|
-
</optional>
|
288
|
-
<attribute name="obligation">
|
289
|
-
<choice>
|
290
|
-
<value>normative</value>
|
291
|
-
<value>informative</value>
|
292
|
-
</choice>
|
293
|
-
</attribute>
|
228
|
+
<ref name="Annex-Section-Attributes"/>
|
294
229
|
<optional>
|
295
230
|
<attribute name="numbered"/>
|
296
231
|
</optional>
|
@@ -314,17 +249,7 @@
|
|
314
249
|
</element>
|
315
250
|
</define>
|
316
251
|
<define name="Content-Section">
|
317
|
-
<
|
318
|
-
<attribute name="id">
|
319
|
-
<data type="ID"/>
|
320
|
-
</attribute>
|
321
|
-
</optional>
|
322
|
-
<optional>
|
323
|
-
<attribute name="language"/>
|
324
|
-
</optional>
|
325
|
-
<optional>
|
326
|
-
<attribute name="script"/>
|
327
|
-
</optional>
|
252
|
+
<ref name="Section-Attributes"/>
|
328
253
|
<optional>
|
329
254
|
<attribute name="numbered"/>
|
330
255
|
</optional>
|
@@ -358,51 +283,9 @@
|
|
358
283
|
<data type="boolean"/>
|
359
284
|
</attribute>
|
360
285
|
</optional>
|
361
|
-
<
|
362
|
-
|
363
|
-
|
364
|
-
</oneOrMore>
|
365
|
-
</element>
|
366
|
-
<optional>
|
367
|
-
<element name="secondary">
|
368
|
-
<oneOrMore>
|
369
|
-
<ref name="PureTextElement"/>
|
370
|
-
</oneOrMore>
|
371
|
-
</element>
|
372
|
-
</optional>
|
373
|
-
<optional>
|
374
|
-
<element name="tertiary">
|
375
|
-
<oneOrMore>
|
376
|
-
<ref name="PureTextElement"/>
|
377
|
-
</oneOrMore>
|
378
|
-
</element>
|
379
|
-
</optional>
|
380
|
-
</element>
|
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>
|
286
|
+
<ref name="index-primary"/>
|
287
|
+
<ref name="index-secondary"/>
|
288
|
+
<ref name="index-tertiary"/>
|
406
289
|
</element>
|
407
290
|
</define>
|
408
291
|
</include>
|
@@ -418,11 +301,6 @@
|
|
418
301
|
<text/>
|
419
302
|
</element>
|
420
303
|
</define>
|
421
|
-
<define name="comment">
|
422
|
-
<element name="comment">
|
423
|
-
<text/>
|
424
|
-
</element>
|
425
|
-
</define>
|
426
304
|
<define name="erefTypeURI">
|
427
305
|
<optional>
|
428
306
|
<attribute name="normative">
|
@@ -1,24 +1,27 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!--
|
3
|
-
instantiations of this grammar may replace leaf strings
|
4
|
-
with more elaborated types; e.g. title (text) replaced with
|
5
|
-
title-main, title-intro, title-part; type replaced with
|
6
|
-
enum.
|
7
|
-
|
8
|
-
some renaming at leaf nodes is permissible
|
9
|
-
|
10
|
-
obligations can change both from optional to mandatory,
|
11
|
-
and from mandatory to optional; optional elements may
|
12
|
-
be omitted; freely positioned alternatives may be replaced
|
13
|
-
with strict ordering
|
14
|
-
|
15
|
-
DO NOT introduce a namespace here. We do not want a distinct namespace
|
16
|
-
for these elements, and a distinct namespace for any grammar inheriting
|
17
|
-
these elements; we just want one namespace for any child grammars
|
18
|
-
of this.
|
19
|
-
-->
|
20
|
-
<!-- VERSION v2.0.0 -->
|
21
2
|
<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">
|
3
|
+
<!-- VERSION v2.0.3 -->
|
4
|
+
|
5
|
+
<!--
|
6
|
+
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
7
|
+
|
8
|
+
instantiations of this grammar may replace leaf strings
|
9
|
+
with more elaborated types; e.g. title (text) replaced with
|
10
|
+
title-main, title-intro, title-part; type replaced with
|
11
|
+
enum.
|
12
|
+
|
13
|
+
some renaming at leaf nodes is permissible
|
14
|
+
|
15
|
+
obligations can change both from optional to mandatory,
|
16
|
+
and from mandatory to optional; optional elements may
|
17
|
+
be omitted; freely positioned alternatives may be replaced
|
18
|
+
with strict ordering
|
19
|
+
|
20
|
+
DO NOT introduce a namespace here. We do not want a distinct namespace
|
21
|
+
for these elements, and a distinct namespace for any grammar inheriting
|
22
|
+
these elements; we just want one namespace for any child grammars
|
23
|
+
of this.
|
24
|
+
-->
|
22
25
|
<include href="reqt.rng"/>
|
23
26
|
<include href="basicdoc.rng">
|
24
27
|
<define name="amend">
|
@@ -33,15 +36,6 @@
|
|
33
36
|
</zeroOrMore>
|
34
37
|
</element>
|
35
38
|
</define>
|
36
|
-
<define name="fn" combine="interleave">
|
37
|
-
<optional>
|
38
|
-
<attribute name="hiddenref">
|
39
|
-
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
40
|
-
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
41
|
-
<data type="boolean"/>
|
42
|
-
</attribute>
|
43
|
-
</optional>
|
44
|
-
</define>
|
45
39
|
<define name="index-primary">
|
46
40
|
<element name="primary">
|
47
41
|
<oneOrMore>
|
@@ -423,6 +417,13 @@ normative or informative references, some split references into sections organiz
|
|
423
417
|
</oneOrMore>
|
424
418
|
</choice>
|
425
419
|
</define>
|
420
|
+
<define name="TrAttributes">
|
421
|
+
<optional>
|
422
|
+
<attribute name="style">
|
423
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
424
|
+
</attribute>
|
425
|
+
</optional>
|
426
|
+
</define>
|
426
427
|
<define name="table-note">
|
427
428
|
<element name="note">
|
428
429
|
<ref name="OptionalId"/>
|
@@ -485,6 +486,22 @@ gives an explicit page orientation</a:documentation>
|
|
485
486
|
</define>
|
486
487
|
</include>
|
487
488
|
<!-- end overrides -->
|
489
|
+
<define name="FnAttributes" combine="interleave">
|
490
|
+
<optional>
|
491
|
+
<attribute name="hiddenref">
|
492
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
493
|
+
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
494
|
+
<data type="boolean"/>
|
495
|
+
</attribute>
|
496
|
+
</optional>
|
497
|
+
</define>
|
498
|
+
<define name="TdAttributes" combine="interleave">
|
499
|
+
<optional>
|
500
|
+
<attribute name="style">
|
501
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
502
|
+
</attribute>
|
503
|
+
</optional>
|
504
|
+
</define>
|
488
505
|
<define name="NumberingAttributes" combine="interleave">
|
489
506
|
<optional>
|
490
507
|
<attribute name="number">
|
@@ -663,6 +680,13 @@ titlecase, or lowercase</a:documentation>
|
|
663
680
|
</attribute>
|
664
681
|
</optional>
|
665
682
|
</define>
|
683
|
+
<define name="Basic-Section-Attributes" combine="interleave">
|
684
|
+
<optional>
|
685
|
+
<attribute name="obligation">
|
686
|
+
<ref name="ObligationType"/>
|
687
|
+
</attribute>
|
688
|
+
</optional>
|
689
|
+
</define>
|
666
690
|
<define name="ObligationType">
|
667
691
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
668
692
|
<choice>
|
@@ -1177,13 +1201,6 @@ numbers</a:documentation>
|
|
1177
1201
|
</attribute>
|
1178
1202
|
</optional>
|
1179
1203
|
</define>
|
1180
|
-
<define name="Basic-Section-Attributes" combine="interleave">
|
1181
|
-
<optional>
|
1182
|
-
<attribute name="obligation">
|
1183
|
-
<ref name="ObligationType"/>
|
1184
|
-
</attribute>
|
1185
|
-
</optional>
|
1186
|
-
</define>
|
1187
1204
|
<define name="reference-clause">
|
1188
1205
|
<a:documentation>References clause with recursive nesting</a:documentation>
|
1189
1206
|
<element name="clause">
|
@@ -1224,7 +1241,7 @@ numbers</a:documentation>
|
|
1224
1241
|
</choice>
|
1225
1242
|
</attribute>
|
1226
1243
|
<attribute name="flavor">
|
1227
|
-
<a:documentation>Metanorma flavor, indicating SDO whose
|
1244
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requirements the realisation aligns to</a:documentation>
|
1228
1245
|
</attribute>
|
1229
1246
|
</define>
|
1230
1247
|
<define name="standard-document">
|
@@ -1234,6 +1251,11 @@ numbers</a:documentation>
|
|
1234
1251
|
<ref name="bibdata">
|
1235
1252
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
1236
1253
|
</ref>
|
1254
|
+
<zeroOrMore>
|
1255
|
+
<ref name="termdocsource">
|
1256
|
+
<a:documentation>Source for term definitions in the document</a:documentation>
|
1257
|
+
</ref>
|
1258
|
+
</zeroOrMore>
|
1237
1259
|
<optional>
|
1238
1260
|
<ref name="misccontainer">
|
1239
1261
|
<a:documentation>Extension point for extraneous elements that need to be added to standards document as data</a:documentation>
|
@@ -1244,36 +1266,44 @@ numbers</a:documentation>
|
|
1244
1266
|
<a:documentation>Front matter that is repeated at the start of documents issued from an SDO, with content not specific to the document</a:documentation>
|
1245
1267
|
</ref>
|
1246
1268
|
</optional>
|
1269
|
+
<ref name="DocumentBody"/>
|
1247
1270
|
<optional>
|
1248
|
-
<ref name="
|
1249
|
-
<a:documentation>
|
1250
|
-
</ref>
|
1251
|
-
</optional>
|
1252
|
-
<ref name="sections">
|
1253
|
-
<a:documentation>Main body of document</a:documentation>
|
1254
|
-
</ref>
|
1255
|
-
<zeroOrMore>
|
1256
|
-
<ref name="annex">
|
1257
|
-
<a:documentation>Annex sections</a:documentation>
|
1258
|
-
</ref>
|
1259
|
-
</zeroOrMore>
|
1260
|
-
<optional>
|
1261
|
-
<ref name="bibliography">
|
1262
|
-
<a:documentation>Bibliographic sections</a:documentation>
|
1263
|
-
</ref>
|
1264
|
-
</optional>
|
1265
|
-
<zeroOrMore>
|
1266
|
-
<ref name="indexsect">
|
1267
|
-
<a:documentation>Index of the document</a:documentation>
|
1268
|
-
</ref>
|
1269
|
-
</zeroOrMore>
|
1270
|
-
<optional>
|
1271
|
-
<ref name="colophon">
|
1272
|
-
<a:documentation>Colophon or postface material</a:documentation>
|
1271
|
+
<ref name="review-container">
|
1272
|
+
<a:documentation>Annotations to the document</a:documentation>
|
1273
1273
|
</ref>
|
1274
1274
|
</optional>
|
1275
1275
|
</element>
|
1276
1276
|
</define>
|
1277
|
+
<define name="DocumentBody">
|
1278
|
+
<optional>
|
1279
|
+
<ref name="preface">
|
1280
|
+
<a:documentation>Prefatory sections</a:documentation>
|
1281
|
+
</ref>
|
1282
|
+
</optional>
|
1283
|
+
<ref name="sections">
|
1284
|
+
<a:documentation>Main body of document</a:documentation>
|
1285
|
+
</ref>
|
1286
|
+
<zeroOrMore>
|
1287
|
+
<ref name="annex">
|
1288
|
+
<a:documentation>Annex sections</a:documentation>
|
1289
|
+
</ref>
|
1290
|
+
</zeroOrMore>
|
1291
|
+
<optional>
|
1292
|
+
<ref name="bibliography">
|
1293
|
+
<a:documentation>Bibliographic sections</a:documentation>
|
1294
|
+
</ref>
|
1295
|
+
</optional>
|
1296
|
+
<zeroOrMore>
|
1297
|
+
<ref name="indexsect">
|
1298
|
+
<a:documentation>Index of the document</a:documentation>
|
1299
|
+
</ref>
|
1300
|
+
</zeroOrMore>
|
1301
|
+
<optional>
|
1302
|
+
<ref name="colophon">
|
1303
|
+
<a:documentation>Colophon or postface material</a:documentation>
|
1304
|
+
</ref>
|
1305
|
+
</optional>
|
1306
|
+
</define>
|
1277
1307
|
<define name="misccontainer">
|
1278
1308
|
<a:documentation>Elements added to metanorma-extension are open-ended, and constitute source data</a:documentation>
|
1279
1309
|
<element name="metanorma-extension">
|
@@ -1282,6 +1312,13 @@ numbers</a:documentation>
|
|
1282
1312
|
</oneOrMore>
|
1283
1313
|
</element>
|
1284
1314
|
</define>
|
1315
|
+
<define name="review-container">
|
1316
|
+
<element name="review-container">
|
1317
|
+
<oneOrMore>
|
1318
|
+
<ref name="review"/>
|
1319
|
+
</oneOrMore>
|
1320
|
+
</element>
|
1321
|
+
</define>
|
1285
1322
|
<define name="preface">
|
1286
1323
|
<element name="preface">
|
1287
1324
|
<oneOrMore>
|
@@ -1581,9 +1618,7 @@ used in document amendments</a:documentation>
|
|
1581
1618
|
<define name="term">
|
1582
1619
|
<a:documentation>Terminology entry with its definition</a:documentation>
|
1583
1620
|
<element name="term">
|
1584
|
-
<ref name="
|
1585
|
-
<ref name="LocalizedStringAttributes"/>
|
1586
|
-
<ref name="BlockAttributes"/>
|
1621
|
+
<ref name="TermAttributes"/>
|
1587
1622
|
<oneOrMore>
|
1588
1623
|
<ref name="preferred">
|
1589
1624
|
<a:documentation>One or more names under which the term being defined is canonically known</a:documentation>
|
@@ -1635,6 +1670,11 @@ used in document amendments</a:documentation>
|
|
1635
1670
|
</ref>
|
1636
1671
|
</element>
|
1637
1672
|
</define>
|
1673
|
+
<define name="TermAttributes">
|
1674
|
+
<ref name="OptionalId"/>
|
1675
|
+
<ref name="LocalizedStringAttributes"/>
|
1676
|
+
<ref name="BlockAttributes"/>
|
1677
|
+
</define>
|
1638
1678
|
<define name="preferred">
|
1639
1679
|
<element name="preferred">
|
1640
1680
|
<ref name="Designation"/>
|
@@ -2296,26 +2336,32 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
2296
2336
|
</element>
|
2297
2337
|
</define>
|
2298
2338
|
<define name="ul_li">
|
2299
|
-
<a:documentation>
|
2339
|
+
<a:documentation>Unordered list item for standards documents</a:documentation>
|
2300
2340
|
<element name="li">
|
2301
2341
|
<ref name="OptionalId"/>
|
2302
|
-
<
|
2303
|
-
|
2304
|
-
<a:documentation>Include a checkbox for the list item</a:documentation>
|
2305
|
-
<data type="boolean"/>
|
2306
|
-
</attribute>
|
2307
|
-
</optional>
|
2308
|
-
<optional>
|
2309
|
-
<attribute name="checkedcheckbox">
|
2310
|
-
<a:documentation>Check the checkbox for the list item</a:documentation>
|
2311
|
-
<data type="boolean"/>
|
2312
|
-
</attribute>
|
2313
|
-
</optional>
|
2314
|
-
<oneOrMore>
|
2315
|
-
<ref name="BasicBlock"/>
|
2316
|
-
</oneOrMore>
|
2342
|
+
<ref name="UlLiAttributes"/>
|
2343
|
+
<ref name="UlLiBody"/>
|
2317
2344
|
</element>
|
2318
2345
|
</define>
|
2346
|
+
<define name="UlLiBody">
|
2347
|
+
<oneOrMore>
|
2348
|
+
<ref name="BasicBlock"/>
|
2349
|
+
</oneOrMore>
|
2350
|
+
</define>
|
2351
|
+
<define name="UlLiAttributes">
|
2352
|
+
<optional>
|
2353
|
+
<attribute name="uncheckedcheckbox">
|
2354
|
+
<a:documentation>Include a checkbox for the list item</a:documentation>
|
2355
|
+
<data type="boolean"/>
|
2356
|
+
</attribute>
|
2357
|
+
</optional>
|
2358
|
+
<optional>
|
2359
|
+
<attribute name="checkedcheckbox">
|
2360
|
+
<a:documentation>Check the checkbox for the list item</a:documentation>
|
2361
|
+
<data type="boolean"/>
|
2362
|
+
</attribute>
|
2363
|
+
</optional>
|
2364
|
+
</define>
|
2319
2365
|
<define name="floating-title">
|
2320
2366
|
<a:documentation>A floating title, outside of the clause hierarchy of the document</a:documentation>
|
2321
2367
|
<element name="floating-title">
|
@@ -1,66 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
2
|
+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<include href="biblio-standoc.rng">
|
4
|
-
<define name="DocumentType">
|
5
|
-
<choice>
|
6
|
-
<value>rfc</value>
|
7
|
-
<value>internet-draft</value>
|
8
|
-
</choice>
|
9
|
-
</define>
|
10
|
-
<define name="BibDataExtensionType">
|
11
|
-
<optional>
|
12
|
-
<attribute name="schema-version"/>
|
13
|
-
</optional>
|
14
|
-
<optional>
|
15
|
-
<ref name="doctype"/>
|
16
|
-
</optional>
|
17
|
-
<optional>
|
18
|
-
<ref name="docsubtype"/>
|
19
|
-
</optional>
|
20
|
-
<ref name="flavor"/>
|
21
|
-
<zeroOrMore>
|
22
|
-
<ref name="editorialgroup"/>
|
23
|
-
</zeroOrMore>
|
24
|
-
<zeroOrMore>
|
25
|
-
<ref name="ics"/>
|
26
|
-
</zeroOrMore>
|
27
|
-
<zeroOrMore>
|
28
|
-
<ref name="area"/>
|
29
|
-
</zeroOrMore>
|
30
|
-
<optional>
|
31
|
-
<ref name="stream"/>
|
32
|
-
</optional>
|
33
|
-
<optional>
|
34
|
-
<ref name="ipr"/>
|
35
|
-
</optional>
|
36
|
-
<optional>
|
37
|
-
<ref name="consensus"/>
|
38
|
-
</optional>
|
39
|
-
<optional>
|
40
|
-
<ref name="index-include"/>
|
41
|
-
</optional>
|
42
|
-
<optional>
|
43
|
-
<ref name="ipr-extract"/>
|
44
|
-
</optional>
|
45
|
-
<optional>
|
46
|
-
<ref name="sort-refs"/>
|
47
|
-
</optional>
|
48
|
-
<optional>
|
49
|
-
<ref name="sym-refs"/>
|
50
|
-
</optional>
|
51
|
-
<optional>
|
52
|
-
<ref name="toc-include"/>
|
53
|
-
</optional>
|
54
|
-
<optional>
|
55
|
-
<ref name="toc-depth"/>
|
56
|
-
</optional>
|
57
|
-
<optional>
|
58
|
-
<ref name="show-on-front-page"/>
|
59
|
-
</optional>
|
60
|
-
<optional>
|
61
|
-
<ref name="processing-instructions"/>
|
62
|
-
</optional>
|
63
|
-
</define>
|
64
4
|
<define name="editorialgroup">
|
65
5
|
<element name="editorialgroup">
|
66
6
|
<zeroOrMore>
|
@@ -68,7 +8,76 @@
|
|
68
8
|
</zeroOrMore>
|
69
9
|
</element>
|
70
10
|
</define>
|
11
|
+
<define name="DocumentType">
|
12
|
+
<choice>
|
13
|
+
<value>rfc</value>
|
14
|
+
<value>internet-draft</value>
|
15
|
+
</choice>
|
16
|
+
</define>
|
71
17
|
</include>
|
18
|
+
<define name="BibDataExtensionType" combine="interleave">
|
19
|
+
<zeroOrMore>
|
20
|
+
<ref name="area">
|
21
|
+
<a:documentation>which IETF area this document relates to. Value should be either the full name or the abbreviation of one of the IETF areas as
|
22
|
+
listed on <http://www.ietf.org/iesg/area.html</a:documentation>
|
23
|
+
</ref>
|
24
|
+
</zeroOrMore>
|
25
|
+
<optional>
|
26
|
+
<ref name="stream">
|
27
|
+
<a:documentation>Document stream of document described in https://tools.ietf.org/html/rfc7841</a:documentation>
|
28
|
+
</ref>
|
29
|
+
</optional>
|
30
|
+
<optional>
|
31
|
+
<ref name="ipr">
|
32
|
+
<a:documentation>IP status of document. See https://tools.ietf.org/html/rfc7991#section-2.45.5</a:documentation>
|
33
|
+
</ref>
|
34
|
+
</optional>
|
35
|
+
<optional>
|
36
|
+
<ref name="processing-instructions">
|
37
|
+
<a:documentation>Processing instructions which will be added to generated RFC XML in the form `<?rfc keyword='value'?></a:documentation>
|
38
|
+
</ref>
|
39
|
+
</optional>
|
40
|
+
<optional>
|
41
|
+
<ref name="consensus">
|
42
|
+
<a:documentation>Document consensus for this document </a:documentation>
|
43
|
+
</ref>
|
44
|
+
</optional>
|
45
|
+
<optional>
|
46
|
+
<ref name="index-include">
|
47
|
+
<a:documentation>Specifies whether formatter should include an index in generated files. If the source file has no `<iref>` elements, an index is never generated</a:documentation>
|
48
|
+
</ref>
|
49
|
+
</optional>
|
50
|
+
<optional>
|
51
|
+
<ref name="ipr-extract">
|
52
|
+
<a:documentation>Identifies a section that can be extracted from text. See https://tools.ietf.org/html/rfc7991#section-2.45.6</a:documentation>
|
53
|
+
</ref>
|
54
|
+
</optional>
|
55
|
+
<optional>
|
56
|
+
<ref name="sort-refs">
|
57
|
+
<a:documentation>Specifies whether the prep tool for RFC XML should sort references</a:documentation>
|
58
|
+
</ref>
|
59
|
+
</optional>
|
60
|
+
<optional>
|
61
|
+
<ref name="sym-refs">
|
62
|
+
<a:documentation>Specifies whether the RFC XML formatter should use symbolic references (such as "`[RFC2119]`") or not (such as "`[3]`")</a:documentation>
|
63
|
+
</ref>
|
64
|
+
</optional>
|
65
|
+
<optional>
|
66
|
+
<ref name="toc-include">
|
67
|
+
<a:documentation>Specifies whether the RFC XML formatter should contain a table of contents</a:documentation>
|
68
|
+
</ref>
|
69
|
+
</optional>
|
70
|
+
<optional>
|
71
|
+
<ref name="toc-depth">
|
72
|
+
<a:documentation>Determines the depth of the table-of-contents; e.g. a value of `3` means three levels of heading are included</a:documentation>
|
73
|
+
</ref>
|
74
|
+
</optional>
|
75
|
+
<optional>
|
76
|
+
<ref name="show-on-front-page">
|
77
|
+
<a:documentation>Display organization of author on front page of IAB documents. Applied to all organizations named in the document front matter</a:documentation>
|
78
|
+
</ref>
|
79
|
+
</optional>
|
80
|
+
</define>
|
72
81
|
<define name="committee">
|
73
82
|
<element name="committee">
|
74
83
|
<ref name="IsoWorkgroup"/>
|
data/lib/metanorma/ietf/reqt.rng
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<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">
|
3
|
+
<define name="requirement">
|
4
|
+
<element name="requirement">
|
5
|
+
<ref name="RequirementType"/>
|
6
|
+
</element>
|
7
|
+
</define>
|
8
|
+
<!-- ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437 -->
|
3
9
|
<!--
|
4
10
|
Presupposes isodoc.rnc, is included in it
|
5
11
|
include "isodoc.rnc" { }
|
@@ -7,14 +13,9 @@
|
|
7
13
|
This is the Metanorma default provisions model; it is overridden by other provisions models,
|
8
14
|
such as Modspec
|
9
15
|
-->
|
10
|
-
<define name="
|
16
|
+
<define name="recommendation">
|
11
17
|
<a:documentation>Specification of an attribute of a subject that is required.
|
12
18
|
NOTE: A requirement can contain other requirements</a:documentation>
|
13
|
-
<element name="requirement">
|
14
|
-
<ref name="RequirementType"/>
|
15
|
-
</element>
|
16
|
-
</define>
|
17
|
-
<define name="recommendation">
|
18
19
|
<a:documentation>Specification of an attribute of a subject that is recommended</a:documentation>
|
19
20
|
<element name="recommendation">
|
20
21
|
<ref name="RequirementType"/>
|
@@ -16,8 +16,8 @@ module Metanorma
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def submission_validate(doc)
|
19
|
-
stream = doc.at(
|
20
|
-
status = doc.at(
|
19
|
+
stream = doc.at("//bibdata/series[@type = 'stream']/title")&.text
|
20
|
+
status = doc.at("//bibdata/status/stage")&.text
|
21
21
|
stream == "editorial" && status != "informational" and
|
22
22
|
@log.add("Document Attributes", nil,
|
23
23
|
"Editorial stream must have Informational status")
|
@@ -32,8 +32,7 @@ module Metanorma
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def workgroup_validate(doc)
|
35
|
-
|
36
|
-
|
35
|
+
@workgroups.empty? and return
|
37
36
|
doc.xpath("//bibdata/ext/editorialgroup/workgroup").each do |wg|
|
38
37
|
wg_norm = wg.text.sub(/ (Working|Research) Group$/, "")
|
39
38
|
@workgroups.include?(wg_norm) and next
|
@@ -43,10 +42,8 @@ module Metanorma
|
|
43
42
|
end
|
44
43
|
end
|
45
44
|
|
46
|
-
def
|
47
|
-
|
48
|
-
schema_validate(formattedstr_strip(doc.dup),
|
49
|
-
File.join(File.dirname(__FILE__), "ietf.rng"))
|
45
|
+
def schema_file
|
46
|
+
"ietf.rng"
|
50
47
|
end
|
51
48
|
|
52
49
|
def cache_workgroup(_node)
|
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.5.
|
4
|
+
version: 3.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-ietf-data
|