metanorma-ietf 3.7.10 → 3.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ietf/blocks.rb +4 -1
- data/lib/isodoc/ietf/cleanup_blocks.rb +5 -0
- data/lib/isodoc/ietf/front.rb +12 -9
- data/lib/isodoc/ietf/lists.rb +4 -1
- data/lib/isodoc/ietf/references.rb +9 -2
- data/lib/isodoc/ietf/terms.rb +4 -0
- data/lib/isodoc/ietf/validation.rb +11 -1
- data/lib/metanorma/ietf/basicdoc.rng +53 -30
- data/lib/metanorma/ietf/biblio-standoc.rng +18 -0
- data/lib/metanorma/ietf/blocks.rb +3 -2
- data/lib/metanorma/ietf/front.rb +1 -1
- data/lib/metanorma/ietf/ietf.rng +24 -24
- data/lib/metanorma/ietf/isodoc.rng +237 -77
- data/lib/metanorma/ietf/reqt.rng +32 -12
- data/lib/metanorma/ietf/version.rb +1 -1
- data/lib/relaton/render/parse.rb +37 -8
- data/metanorma-ietf.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16abd3bccb54974e0c04c25e04bb71e79887b728395927a119922170ad13f3d6
|
|
4
|
+
data.tar.gz: 79aee453b25eb14b62fc2f7b9842830a07d93f50c8a9b46e731679a1eeaa91f8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f054786c9b9b730213d6fd582ed2bed04591d7e78ae60c54214d6f40636cf2c88b9dcf3539d3583667d04d407bad13e3a5e94cc6c1e5e871072d0e367e979d63
|
|
7
|
+
data.tar.gz: c43c6050cd0de928a77cd0b3ad41f1e9de94d97f31b38c53159011580d92ad52a0fba70dedd4d36573984835e7c3563d4662c2cbdfa9bad7f9550111d2e7a8c6
|
data/lib/isodoc/ietf/blocks.rb
CHANGED
|
@@ -90,7 +90,10 @@ module IsoDoc
|
|
|
90
90
|
def pre_parse(node, out)
|
|
91
91
|
out.artwork **attr_code(anchor: node["id"], align: node["align"],
|
|
92
92
|
alt: node["alt"], type: "ascii-art") do |s|
|
|
93
|
-
|
|
93
|
+
# \A, not ^: ^ anchors at every line start, so /^\n/ deleted
|
|
94
|
+
# the first BLANK LINE inside the artwork instead of a
|
|
95
|
+
# leading newline (#286)
|
|
96
|
+
s.cdata node.text.sub(/\A\n/, "").gsub(/\t/, " ")
|
|
94
97
|
end
|
|
95
98
|
end
|
|
96
99
|
|
|
@@ -146,6 +146,11 @@ module IsoDoc
|
|
|
146
146
|
|
|
147
147
|
def sourcecode_xref(node)
|
|
148
148
|
ret = @xrefs.anchor(node["target"], :xref, false)&.gsub(%r{<[^>]+>}, "")
|
|
149
|
+
# an unresolved target yields nil: degrade to the raw target
|
|
150
|
+
# text instead of crashing Node#replace (#278; trigger: xref
|
|
151
|
+
# inside a literal block in an abstract, whose anchors the
|
|
152
|
+
# xref table does not know)
|
|
153
|
+
ret ||= node["target"].to_s
|
|
149
154
|
s = node["section"] and ret += ", Section #{s}"
|
|
150
155
|
node.replace(ret)
|
|
151
156
|
end
|
data/lib/isodoc/ietf/front.rb
CHANGED
|
@@ -228,16 +228,19 @@ module IsoDoc
|
|
|
228
228
|
end
|
|
229
229
|
|
|
230
230
|
def note(isoxml, front)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
231
|
+
# every abstract note, not just the first: the .at singleton
|
|
232
|
+
# silently deleted any further notes (#285)
|
|
233
|
+
isoxml.xpath(ns("//preface/abstract/note | //preface/foreword/note"))
|
|
234
|
+
.each do |a|
|
|
235
|
+
front.note **attr_code(removeInRFC: a["removeInRFC"]) do |n|
|
|
236
|
+
title = a.at(ns("./name")) and n.name do |t|
|
|
237
|
+
title.children.each { |tt| parse(tt, t) }
|
|
238
|
+
end
|
|
239
|
+
a.children.reject { |c1| c1.name == "name" }.each do |c1|
|
|
240
|
+
parse(c1, n)
|
|
241
|
+
end
|
|
242
|
+
a.remove
|
|
239
243
|
end
|
|
240
|
-
a.remove
|
|
241
244
|
end
|
|
242
245
|
end
|
|
243
246
|
|
data/lib/isodoc/ietf/lists.rb
CHANGED
|
@@ -54,7 +54,10 @@ module IsoDoc
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def dt_parse(dterm, term)
|
|
57
|
-
|
|
57
|
+
# text, not <<: the raw-fragment insert parses the string as
|
|
58
|
+
# markup, so a bare "&" (or "<") in the term is invalid there
|
|
59
|
+
# and libxml2 drops it silently (#287; same class as #267)
|
|
60
|
+
if dterm.elements.empty? then term.text dterm.text
|
|
58
61
|
else dterm.children.each { |n| parse(n, term) }
|
|
59
62
|
end
|
|
60
63
|
end
|
|
@@ -85,11 +85,18 @@ module IsoDoc
|
|
|
85
85
|
# unify with the shared bibrender path when refactoring the reference
|
|
86
86
|
# pipeline.
|
|
87
87
|
did = bib1.at(ns("./docidentifier"))
|
|
88
|
-
|
|
88
|
+
# A formattedref takes this path even when a title is also
|
|
89
|
+
# present: relaton-render honours the formattedref by returning
|
|
90
|
+
# it as BARE TEXT, which then lands as loose text inside
|
|
91
|
+
# <reference> -- invalid RFC XML (#279; trigger: relaton BCP
|
|
92
|
+
# collection items, e.g. citing "BCP 14").
|
|
93
|
+
if f || (!bib1.at(ns("./title")) && did)
|
|
89
94
|
ref.front do |front|
|
|
90
95
|
front.title do |t|
|
|
91
96
|
if f then children_parse(f, t)
|
|
92
|
-
|
|
97
|
+
# text, not <<: raw-fragment insert silently drops a
|
|
98
|
+
# bare "&" in the identifier (#287 sibling)
|
|
99
|
+
else t.text did.text
|
|
93
100
|
end
|
|
94
101
|
end
|
|
95
102
|
end
|
data/lib/isodoc/ietf/terms.rb
CHANGED
|
@@ -86,6 +86,10 @@ module IsoDoc
|
|
|
86
86
|
def termdocsource_parse(_node, _out); end
|
|
87
87
|
|
|
88
88
|
def concept_parse(node, out)
|
|
89
|
+
# generator-emitted term-resolution failure reports
|
|
90
|
+
# (metanorma-model-iso#144) render in boldface
|
|
91
|
+
err = node.at(ns("./errormsg")) and
|
|
92
|
+
return out.strong { |s| err.children.each { |n| parse(n, s) } }
|
|
89
93
|
ref = node.at(ns("./xref | ./eref | ./termref"))
|
|
90
94
|
render = node.at(ns("./renderterm"))
|
|
91
95
|
!ref && !render and return node.children.each { |n| parse(n, out) }
|
|
@@ -188,11 +188,21 @@ module IsoDoc
|
|
|
188
188
|
ret
|
|
189
189
|
end
|
|
190
190
|
|
|
191
|
+
# RFC 7991 s2.45.5: the legal ipr values. The old
|
|
192
|
+
# /trust200902$/ test matched only the bare lowercase value --
|
|
193
|
+
# every capital-T variant (pre5378Trust200902,
|
|
194
|
+
# noModificationTrust200902, ...) and the 200811 family were
|
|
195
|
+
# rejected as unknown (#280).
|
|
196
|
+
IPR_VALUES = %w(trust200902 noModificationTrust200902
|
|
197
|
+
noDerivativesTrust200902 pre5378Trust200902
|
|
198
|
+
trust200811 noModificationTrust200811
|
|
199
|
+
noDerivativesTrust200811 none).freeze
|
|
200
|
+
|
|
191
201
|
# 5.4.2.3. "Copyright Notice" Insertion
|
|
192
202
|
def ipr_check(xml)
|
|
193
203
|
xml.root["ipr"] or
|
|
194
204
|
return ["Missing ipr attribute on <rfc> element (:ipr:)"]
|
|
195
|
-
|
|
205
|
+
IPR_VALUES.include?(xml.root["ipr"]) or
|
|
196
206
|
return ["Unknown ipr attribute on <rfc> element (:ipr:): " \
|
|
197
207
|
"#{xml.root['ipr']}"]
|
|
198
208
|
[]
|
|
@@ -954,30 +954,36 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
954
954
|
<define name="TdBody">
|
|
955
955
|
<choice>
|
|
956
956
|
<zeroOrMore>
|
|
957
|
-
<
|
|
958
|
-
<a:documentation>Table cell is a block</a:documentation>
|
|
957
|
+
<choice>
|
|
958
|
+
<a:documentation>Table cell is a block; footnotes admitted inline (metanorma-model-iso#154)</a:documentation>
|
|
959
959
|
<ref name="TextElement"/>
|
|
960
|
-
|
|
960
|
+
<ref name="fn"/>
|
|
961
|
+
</choice>
|
|
961
962
|
</zeroOrMore>
|
|
962
963
|
<oneOrMore>
|
|
963
|
-
<
|
|
964
|
-
<a:documentation>Table cell contains a block</a:documentation>
|
|
965
|
-
|
|
964
|
+
<choice>
|
|
965
|
+
<a:documentation>Table cell contains a block; notes admitted alongside paragraphs (metanorma-model-iso#157)</a:documentation>
|
|
966
|
+
<ref name="paragraph-with-footnote"/>
|
|
967
|
+
<ref name="note"/>
|
|
968
|
+
</choice>
|
|
966
969
|
</oneOrMore>
|
|
967
970
|
</choice>
|
|
968
971
|
</define>
|
|
969
972
|
<define name="TdNoIdBody">
|
|
970
973
|
<choice>
|
|
971
974
|
<zeroOrMore>
|
|
972
|
-
<
|
|
973
|
-
<a:documentation>Table cell is a block</a:documentation>
|
|
975
|
+
<choice>
|
|
976
|
+
<a:documentation>Table cell is a block; footnotes admitted inline (metanorma-model-iso#154)</a:documentation>
|
|
974
977
|
<ref name="TextElement"/>
|
|
975
|
-
|
|
978
|
+
<ref name="fn"/>
|
|
979
|
+
</choice>
|
|
976
980
|
</zeroOrMore>
|
|
977
981
|
<oneOrMore>
|
|
978
|
-
<
|
|
979
|
-
<a:documentation>Table cell contains a block</a:documentation>
|
|
980
|
-
|
|
982
|
+
<choice>
|
|
983
|
+
<a:documentation>Table cell contains a block; notes admitted alongside paragraphs (metanorma-model-iso#157)</a:documentation>
|
|
984
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
|
985
|
+
<ref name="note-no-id"/>
|
|
986
|
+
</choice>
|
|
981
987
|
</oneOrMore>
|
|
982
988
|
</choice>
|
|
983
989
|
</define>
|
|
@@ -1030,16 +1036,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
1030
1036
|
</ref>
|
|
1031
1037
|
</optional>
|
|
1032
1038
|
<oneOrMore>
|
|
1033
|
-
<
|
|
1039
|
+
<ref name="ExampleBodyContent">
|
|
1034
1040
|
<a:documentation>Content of the example</a:documentation>
|
|
1035
|
-
|
|
1036
|
-
<ref name="ul"/>
|
|
1037
|
-
<ref name="ol"/>
|
|
1038
|
-
<ref name="dl"/>
|
|
1039
|
-
<ref name="quote"/>
|
|
1040
|
-
<ref name="sourcecode"/>
|
|
1041
|
-
<ref name="paragraph-with-footnote"/>
|
|
1042
|
-
</choice>
|
|
1041
|
+
</ref>
|
|
1043
1042
|
</oneOrMore>
|
|
1044
1043
|
<zeroOrMore>
|
|
1045
1044
|
<ref name="note">
|
|
@@ -1047,6 +1046,23 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
1047
1046
|
</ref>
|
|
1048
1047
|
</zeroOrMore>
|
|
1049
1048
|
</define>
|
|
1049
|
+
<define name="ExampleBodyContent">
|
|
1050
|
+
<a:documentation>Content alternatives of an example. Named as an extension hook: higher
|
|
1051
|
+
layers may admit further alternatives additively (|=) without copying the
|
|
1052
|
+
example model (metanorma-model-iso#160). note is admitted interleaved as
|
|
1053
|
+
attested authoring practice (metanorma-model-iso#157, maintainer hierarchy
|
|
1054
|
+
reservation recorded there)</a:documentation>
|
|
1055
|
+
<choice>
|
|
1056
|
+
<ref name="formula"/>
|
|
1057
|
+
<ref name="ul"/>
|
|
1058
|
+
<ref name="ol"/>
|
|
1059
|
+
<ref name="dl"/>
|
|
1060
|
+
<ref name="quote"/>
|
|
1061
|
+
<ref name="sourcecode"/>
|
|
1062
|
+
<ref name="paragraph-with-footnote"/>
|
|
1063
|
+
<ref name="note"/>
|
|
1064
|
+
</choice>
|
|
1065
|
+
</define>
|
|
1050
1066
|
<define name="ExampleNoIdBody">
|
|
1051
1067
|
<optional>
|
|
1052
1068
|
<ref name="tname">
|
|
@@ -1054,16 +1070,9 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
1054
1070
|
</ref>
|
|
1055
1071
|
</optional>
|
|
1056
1072
|
<oneOrMore>
|
|
1057
|
-
<
|
|
1073
|
+
<ref name="ExampleNoIdBodyContent">
|
|
1058
1074
|
<a:documentation>Content of the example</a:documentation>
|
|
1059
|
-
|
|
1060
|
-
<ref name="ul-no-id"/>
|
|
1061
|
-
<ref name="ol-no-id"/>
|
|
1062
|
-
<ref name="dl-no-id"/>
|
|
1063
|
-
<ref name="quote-no-id"/>
|
|
1064
|
-
<ref name="sourcecode-no-id"/>
|
|
1065
|
-
<ref name="paragraph-with-footnote-no-id"/>
|
|
1066
|
-
</choice>
|
|
1075
|
+
</ref>
|
|
1067
1076
|
</oneOrMore>
|
|
1068
1077
|
<zeroOrMore>
|
|
1069
1078
|
<ref name="note-no-id">
|
|
@@ -1071,6 +1080,20 @@ in case the table cannot be rendered accessibly (HTML 5)</a:documentation>
|
|
|
1071
1080
|
</ref>
|
|
1072
1081
|
</zeroOrMore>
|
|
1073
1082
|
</define>
|
|
1083
|
+
<define name="ExampleNoIdBodyContent">
|
|
1084
|
+
<a:documentation>Content alternatives of the no-id example variant; extension hook as
|
|
1085
|
+
ExampleBodyContent (metanorma-model-iso#160)</a:documentation>
|
|
1086
|
+
<choice>
|
|
1087
|
+
<ref name="formula-no-id"/>
|
|
1088
|
+
<ref name="ul-no-id"/>
|
|
1089
|
+
<ref name="ol-no-id"/>
|
|
1090
|
+
<ref name="dl-no-id"/>
|
|
1091
|
+
<ref name="quote-no-id"/>
|
|
1092
|
+
<ref name="sourcecode-no-id"/>
|
|
1093
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
|
1094
|
+
<ref name="note-no-id"/>
|
|
1095
|
+
</choice>
|
|
1096
|
+
</define>
|
|
1074
1097
|
<define name="admonition">
|
|
1075
1098
|
<a:documentation>A sidebar block outside of the main flow of text, conveying particular warnings or supplementary text to the reader</a:documentation>
|
|
1076
1099
|
<element name="admonition">
|
|
@@ -50,6 +50,24 @@
|
|
|
50
50
|
</choice>
|
|
51
51
|
</element>
|
|
52
52
|
</define>
|
|
53
|
+
<define name="formattedref">
|
|
54
|
+
<a:documentation>Footnotes are admitted in formatted references in the standoc context:
|
|
55
|
+
free-form bibliography entries may carry authored footnotes
|
|
56
|
+
(metanorma-model-iso#154)</a:documentation>
|
|
57
|
+
<element name="formattedref">
|
|
58
|
+
<optional>
|
|
59
|
+
<attribute name="format">
|
|
60
|
+
<a:documentation>format of formatted reference; Metanorma assumes references are formatted as Metanorma XML</a:documentation>
|
|
61
|
+
</attribute>
|
|
62
|
+
</optional>
|
|
63
|
+
<oneOrMore>
|
|
64
|
+
<choice>
|
|
65
|
+
<ref name="TextElement"/>
|
|
66
|
+
<ref name="fn"/>
|
|
67
|
+
</choice>
|
|
68
|
+
</oneOrMore>
|
|
69
|
+
</element>
|
|
70
|
+
</define>
|
|
53
71
|
</include>
|
|
54
72
|
<define name="ext">
|
|
55
73
|
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
|
@@ -68,8 +68,9 @@ module Metanorma
|
|
|
68
68
|
noko do |xml|
|
|
69
69
|
xml.figure **literal_attrs(node) do |f|
|
|
70
70
|
block_title(node, f)
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
pre_attrs = id_attr(node).tap { |h| h.delete(:anchor) }
|
|
72
|
+
.merge(align: node.attr("align"), alt: node.attr("alt"))
|
|
73
|
+
f.pre node.lines.join("\n"), **attr_code(pre_attrs)
|
|
73
74
|
end
|
|
74
75
|
end
|
|
75
76
|
end
|
data/lib/metanorma/ietf/front.rb
CHANGED
|
@@ -65,6 +65,7 @@ module Metanorma
|
|
|
65
65
|
end
|
|
66
66
|
add_noko_elem(xml, "ipr", node.attr("ipr") || "trust200902")
|
|
67
67
|
# xml.ipr (node.attr("ipr") || "trust200902")
|
|
68
|
+
xml.pi { |pi| set_pi(node, pi) }
|
|
68
69
|
x = node.attr("consensus") and xml.consensus (x != "false")
|
|
69
70
|
x = node.attr("index-include") and xml.indexInclude (x != "false")
|
|
70
71
|
add_noko_elem(xml, "iprExtract", node.attr("ipr-extract"))
|
|
@@ -75,7 +76,6 @@ module Metanorma
|
|
|
75
76
|
add_noko_elem(xml, "tocDepth", node.attr("toc-depth"))
|
|
76
77
|
# x = node.attr("toc-depth") and xml.tocDepth x
|
|
77
78
|
x = node.attr("show-on-front-page") and xml.showOnFrontPage (x != "false")
|
|
78
|
-
xml.pi { |pi| set_pi(node, pi) }
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
def set_pi(node, pi)
|
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/standoc' xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/standoc' 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
3
|
<include href="relaton-ietf.rng"/>
|
|
4
4
|
<include href="isodoc.rng">
|
|
5
5
|
<define name="ParagraphAttributes">
|
|
@@ -50,13 +50,16 @@
|
|
|
50
50
|
</define>
|
|
51
51
|
<define name="OlAttributes">
|
|
52
52
|
<attribute name="type">
|
|
53
|
+
<a:documentation>One of the named numbering styles, or a renderer-native numbering
|
|
54
|
+
format string passed through for xml2rfc to expand, e.g. "R%d"
|
|
55
|
+
(metanorma-model-iso#159; subsumes the former "text" named value)</a:documentation>
|
|
53
56
|
<choice>
|
|
54
57
|
<value>roman</value>
|
|
55
58
|
<value>alphabet</value>
|
|
56
59
|
<value>arabic</value>
|
|
57
60
|
<value>roman_upper</value>
|
|
58
61
|
<value>alphabet_upper</value>
|
|
59
|
-
<
|
|
62
|
+
<text/>
|
|
60
63
|
</choice>
|
|
61
64
|
</attribute>
|
|
62
65
|
<optional>
|
|
@@ -140,28 +143,6 @@
|
|
|
140
143
|
<ref name="XrefBody"/>
|
|
141
144
|
</element>
|
|
142
145
|
</define>
|
|
143
|
-
<define name="erefType">
|
|
144
|
-
<optional>
|
|
145
|
-
<attribute name="normative">
|
|
146
|
-
<data type="boolean"/>
|
|
147
|
-
</attribute>
|
|
148
|
-
</optional>
|
|
149
|
-
<attribute name="citeas"/>
|
|
150
|
-
<attribute name="type">
|
|
151
|
-
<ref name="ReferenceFormat"/>
|
|
152
|
-
</attribute>
|
|
153
|
-
<optional>
|
|
154
|
-
<attribute name="alt"/>
|
|
155
|
-
</optional>
|
|
156
|
-
<optional>
|
|
157
|
-
<attribute name="displayFormat"/>
|
|
158
|
-
</optional>
|
|
159
|
-
<optional>
|
|
160
|
-
<attribute name="relative"/>
|
|
161
|
-
</optional>
|
|
162
|
-
<ref name="CitationType"/>
|
|
163
|
-
<text/>
|
|
164
|
-
</define>
|
|
165
146
|
<define name="quote-source">
|
|
166
147
|
<element name="source">
|
|
167
148
|
<ref name="erefTypeURI"/>
|
|
@@ -261,6 +242,25 @@
|
|
|
261
242
|
</define>
|
|
262
243
|
</include>
|
|
263
244
|
<!-- end overrides -->
|
|
245
|
+
<define name="erefType" combine="interleave">
|
|
246
|
+
<a:documentation>RFC XML idiosyncratic attributes on cross-references to bibliographic
|
|
247
|
+
entities. Additive augmentation of the base erefType: the former wholesale
|
|
248
|
+
redefinition in the override block had rotted against the base grammar
|
|
249
|
+
(bare mixed text predating ErefBody/display-text), and is retired per the
|
|
250
|
+
flavor-override-elimination direction (metanorma-model-iso#158). NB @type
|
|
251
|
+
thereby reverts to optional (base): requiredness cannot be tightened
|
|
252
|
+
through &=; the generator always emits it</a:documentation>
|
|
253
|
+
<optional>
|
|
254
|
+
<attribute name="displayFormat">
|
|
255
|
+
<a:documentation>Rendering format for the reference in RFC XML (xml2rfc displayFormat)</a:documentation>
|
|
256
|
+
</attribute>
|
|
257
|
+
</optional>
|
|
258
|
+
<optional>
|
|
259
|
+
<attribute name="relative">
|
|
260
|
+
<a:documentation>Reference target expressed relative to the containing document (xml2rfc relative)</a:documentation>
|
|
261
|
+
</attribute>
|
|
262
|
+
</optional>
|
|
263
|
+
</define>
|
|
264
264
|
<define name="TextElement" combine="choice">
|
|
265
265
|
<ref name="review"/>
|
|
266
266
|
</define>
|
|
@@ -27,11 +27,89 @@
|
|
|
27
27
|
<define name="amend">
|
|
28
28
|
<a:documentation>Block expressing a machine-readable change in a document</a:documentation>
|
|
29
29
|
<element name="amend">
|
|
30
|
+
<ref name="OptionalId"/>
|
|
30
31
|
<ref name="BlockAttributes"/>
|
|
31
|
-
<
|
|
32
|
+
<attribute name="change">
|
|
33
|
+
<a:documentation>The type of change described in this block</a:documentation>
|
|
34
|
+
<choice>
|
|
35
|
+
<value>add</value>
|
|
36
|
+
<value>modify</value>
|
|
37
|
+
<value>delete</value>
|
|
38
|
+
<value>replace</value>
|
|
39
|
+
</choice>
|
|
40
|
+
</attribute>
|
|
41
|
+
<optional>
|
|
42
|
+
<attribute name="path"/>
|
|
43
|
+
</optional>
|
|
44
|
+
<optional>
|
|
45
|
+
<attribute name="path_end"/>
|
|
46
|
+
</optional>
|
|
47
|
+
<optional>
|
|
48
|
+
<attribute name="title"/>
|
|
49
|
+
</optional>
|
|
50
|
+
<optional>
|
|
51
|
+
<attribute name="position">
|
|
52
|
+
<choice>
|
|
53
|
+
<value>before</value>
|
|
54
|
+
<value>after</value>
|
|
55
|
+
</choice>
|
|
56
|
+
</attribute>
|
|
57
|
+
</optional>
|
|
58
|
+
<optional>
|
|
59
|
+
<element name="location">
|
|
60
|
+
<a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
|
|
61
|
+
<zeroOrMore>
|
|
62
|
+
<choice>
|
|
63
|
+
<ref name="locality"/>
|
|
64
|
+
<ref name="localityStack"/>
|
|
65
|
+
</choice>
|
|
66
|
+
</zeroOrMore>
|
|
67
|
+
</element>
|
|
68
|
+
</optional>
|
|
32
69
|
<zeroOrMore>
|
|
33
70
|
<ref name="autonumber">
|
|
34
|
-
<a:documentation>Specification of how blocks of a given class should be autonumbered within
|
|
71
|
+
<a:documentation>Specification of how blocks of a given class should be autonumbered within the newcontent element.
|
|
72
|
+
Precedes the content it numbers</a:documentation>
|
|
73
|
+
</ref>
|
|
74
|
+
</zeroOrMore>
|
|
75
|
+
<zeroOrMore>
|
|
76
|
+
<element name="description">
|
|
77
|
+
<a:documentation>Description(s) of the change described in this block</a:documentation>
|
|
78
|
+
<oneOrMore>
|
|
79
|
+
<ref name="BasicBlock"/>
|
|
80
|
+
</oneOrMore>
|
|
81
|
+
</element>
|
|
82
|
+
</zeroOrMore>
|
|
83
|
+
<optional>
|
|
84
|
+
<element name="newcontent">
|
|
85
|
+
<a:documentation>New content to be added to the document; applicable to add and modify.
|
|
86
|
+
Can be blocks and/or clauses</a:documentation>
|
|
87
|
+
<ref name="OptionalId"/>
|
|
88
|
+
<zeroOrMore>
|
|
89
|
+
<choice>
|
|
90
|
+
<ref name="BasicBlock"/>
|
|
91
|
+
<ref name="clause"/>
|
|
92
|
+
</choice>
|
|
93
|
+
</zeroOrMore>
|
|
94
|
+
</element>
|
|
95
|
+
</optional>
|
|
96
|
+
<zeroOrMore>
|
|
97
|
+
<element name="description">
|
|
98
|
+
<a:documentation>Further description(s) of the change, following the new content
|
|
99
|
+
(e.g. consequential renumbering instructions)</a:documentation>
|
|
100
|
+
<oneOrMore>
|
|
101
|
+
<ref name="BasicBlock"/>
|
|
102
|
+
</oneOrMore>
|
|
103
|
+
</element>
|
|
104
|
+
</zeroOrMore>
|
|
105
|
+
<zeroOrMore>
|
|
106
|
+
<ref name="classification">
|
|
107
|
+
<a:documentation>Classification of the change</a:documentation>
|
|
108
|
+
</ref>
|
|
109
|
+
</zeroOrMore>
|
|
110
|
+
<zeroOrMore>
|
|
111
|
+
<ref name="contributor">
|
|
112
|
+
<a:documentation>Contributor responsible for the change</a:documentation>
|
|
35
113
|
</ref>
|
|
36
114
|
</zeroOrMore>
|
|
37
115
|
</element>
|
|
@@ -42,6 +120,27 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
|
|
|
42
120
|
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
|
43
121
|
<text/>
|
|
44
122
|
</define>
|
|
123
|
+
<define name="image-no-id">
|
|
124
|
+
<a:documentation>Container for image content: optional ID attributes recursively (for use in Relaton, metadata).
|
|
125
|
+
The embedded SVG content is admitted here as in ImageBody, and is NOT subject to the no-id
|
|
126
|
+
convention of this model family: SVGs carry ids pervasively, and those ids cannot be stripped,
|
|
127
|
+
because they are load-bearing for image-map functionality (svgmap hyperlink targets)</a:documentation>
|
|
128
|
+
<element name="image">
|
|
129
|
+
<ref name="OptionalId"/>
|
|
130
|
+
<ref name="ImageAttributes"/>
|
|
131
|
+
<optional>
|
|
132
|
+
<element name="svg">
|
|
133
|
+
<a:documentation>image can contain SVG XML, which is used to access its identifiers within the Metanorma XML</a:documentation>
|
|
134
|
+
<oneOrMore>
|
|
135
|
+
<choice>
|
|
136
|
+
<text/>
|
|
137
|
+
<ref name="AnyElement"/>
|
|
138
|
+
</choice>
|
|
139
|
+
</oneOrMore>
|
|
140
|
+
</element>
|
|
141
|
+
</optional>
|
|
142
|
+
</element>
|
|
143
|
+
</define>
|
|
45
144
|
<define name="review">
|
|
46
145
|
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
|
47
146
|
the type attribute defaults to `review` for reviews</a:documentation>
|
|
@@ -49,7 +148,7 @@ the type attribute defaults to `review` for reviews</a:documentation>
|
|
|
49
148
|
<ref name="RequiredId"/>
|
|
50
149
|
<ref name="ReviewAttributes"/>
|
|
51
150
|
<oneOrMore>
|
|
52
|
-
<ref name="
|
|
151
|
+
<ref name="BasicBlock">
|
|
53
152
|
<a:documentation>Reviewer comments content</a:documentation>
|
|
54
153
|
</ref>
|
|
55
154
|
</oneOrMore>
|
|
@@ -85,10 +184,14 @@ the type attribute defaults to `review` for reviews</a:documentation>
|
|
|
85
184
|
<define name="section-title">
|
|
86
185
|
<a:documentation>Title(s) of a clause</a:documentation>
|
|
87
186
|
<element name="title">
|
|
88
|
-
<a:documentation>Title proper for a clause
|
|
187
|
+
<a:documentation>Title proper for a clause. Footnotes on section headings are admitted
|
|
188
|
+
(metanorma-model-iso#154)</a:documentation>
|
|
89
189
|
<ref name="RequiredId"/>
|
|
90
190
|
<zeroOrMore>
|
|
91
|
-
<
|
|
191
|
+
<choice>
|
|
192
|
+
<ref name="TextElement"/>
|
|
193
|
+
<ref name="fn"/>
|
|
194
|
+
</choice>
|
|
92
195
|
</zeroOrMore>
|
|
93
196
|
</element>
|
|
94
197
|
<zeroOrMore>
|
|
@@ -154,13 +257,17 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
154
257
|
<ref name="BlockAttributes"/>
|
|
155
258
|
<optional>
|
|
156
259
|
<attribute name="type">
|
|
157
|
-
<a:documentation>Type of numbering to be applied to the list items
|
|
260
|
+
<a:documentation>Type of numbering to be applied to the list items: one of the five named
|
|
261
|
+
numbering styles, or a renderer-native numbering format string passed
|
|
262
|
+
through for the target rendering language to expand (e.g. xml2rfc v2
|
|
263
|
+
format strings such as "R%d", carried through by metanorma-ietf)</a:documentation>
|
|
158
264
|
<choice>
|
|
159
265
|
<value>roman</value>
|
|
160
266
|
<value>alphabet</value>
|
|
161
267
|
<value>arabic</value>
|
|
162
268
|
<value>roman_upper</value>
|
|
163
269
|
<value>alphabet_upper</value>
|
|
270
|
+
<text/>
|
|
164
271
|
</choice>
|
|
165
272
|
</attribute>
|
|
166
273
|
</optional>
|
|
@@ -220,30 +327,23 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
220
327
|
</attribute>
|
|
221
328
|
</optional>
|
|
222
329
|
</define>
|
|
223
|
-
<define name="
|
|
224
|
-
<
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
</choice>
|
|
241
|
-
</oneOrMore>
|
|
242
|
-
<zeroOrMore>
|
|
243
|
-
<ref name="note">
|
|
244
|
-
<a:documentation>Notes whose scope is the current block</a:documentation>
|
|
245
|
-
</ref>
|
|
246
|
-
</zeroOrMore>
|
|
330
|
+
<define name="ExampleBodyContent">
|
|
331
|
+
<a:documentation>Content alternatives of an example in the isodoc context: as basicdoc,
|
|
332
|
+
with figure admitted, and note admitted only trailing the example body
|
|
333
|
+
rather than interleaved. The content hook is overridden rather than
|
|
334
|
+
ExampleBody itself, so that the extension seam survives: additive
|
|
335
|
+
admissions (|=) from higher layers, such as illustrative provisions in
|
|
336
|
+
reqt, attach to the definition that governs (metanorma-model-iso#160)</a:documentation>
|
|
337
|
+
<choice>
|
|
338
|
+
<ref name="formula"/>
|
|
339
|
+
<ref name="ul"/>
|
|
340
|
+
<ref name="ol"/>
|
|
341
|
+
<ref name="dl"/>
|
|
342
|
+
<ref name="quote"/>
|
|
343
|
+
<ref name="sourcecode"/>
|
|
344
|
+
<ref name="paragraph-with-footnote"/>
|
|
345
|
+
<ref name="figure"/>
|
|
346
|
+
</choice>
|
|
247
347
|
</define>
|
|
248
348
|
<define name="TableBody">
|
|
249
349
|
<optional>
|
|
@@ -413,20 +513,22 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
413
513
|
<define name="source">
|
|
414
514
|
<element name="source">
|
|
415
515
|
<attribute name="status">
|
|
416
|
-
<a:documentation>The status of the
|
|
516
|
+
<a:documentation>The status of the block content, relative to the source it has been taken from</a:documentation>
|
|
417
517
|
<ref name="SourceStatusType"/>
|
|
418
518
|
</attribute>
|
|
419
|
-
<
|
|
420
|
-
<
|
|
421
|
-
|
|
422
|
-
|
|
519
|
+
<optional>
|
|
520
|
+
<attribute name="type">
|
|
521
|
+
<a:documentation>The type of the source relation. Term-management vocabulary (authoritative/lineage);
|
|
522
|
+
not normally applicable to block attribution, and omitted by the generator for blocks</a:documentation>
|
|
523
|
+
<ref name="SourceTypeType"/>
|
|
524
|
+
</attribute>
|
|
525
|
+
</optional>
|
|
423
526
|
<ref name="origin">
|
|
424
|
-
<a:documentation>The original document and location
|
|
527
|
+
<a:documentation>The original document and location the block content has been obtained from</a:documentation>
|
|
425
528
|
</ref>
|
|
426
529
|
<optional>
|
|
427
530
|
<ref name="modification">
|
|
428
|
-
<a:documentation>Any changes that the
|
|
429
|
-
in order to be applicable in this standardisation document</a:documentation>
|
|
531
|
+
<a:documentation>Any changes that the block content has undergone relative to the original document</a:documentation>
|
|
430
532
|
</ref>
|
|
431
533
|
</optional>
|
|
432
534
|
</element>
|
|
@@ -852,6 +954,11 @@ titlecase, or lowercase</a:documentation>
|
|
|
852
954
|
<a:documentation>Width of the figure block in rendering</a:documentation>
|
|
853
955
|
</attribute>
|
|
854
956
|
</optional>
|
|
957
|
+
<optional>
|
|
958
|
+
<attribute name="height">
|
|
959
|
+
<a:documentation>Height of the figure block in rendering</a:documentation>
|
|
960
|
+
</attribute>
|
|
961
|
+
</optional>
|
|
855
962
|
<ref name="BlockAttributesCore"/>
|
|
856
963
|
</define>
|
|
857
964
|
<define name="SourceAttributes" combine="interleave">
|
|
@@ -1066,6 +1173,9 @@ parargaph sources are currently only rendered in metanorma-plateau</a:documentat
|
|
|
1066
1173
|
<a:documentation>Internal reference (for Metanorma document collections)</a:documentation>
|
|
1067
1174
|
</define>
|
|
1068
1175
|
<define name="TextElement" combine="choice">
|
|
1176
|
+
<a:documentation>Form input elements are admitted as inline content generally, mirroring
|
|
1177
|
+
HTML phrasing content: inputs sit inside paragraphs and table cells
|
|
1178
|
+
within forms (metanorma-model-iso#145)</a:documentation>
|
|
1069
1179
|
<choice>
|
|
1070
1180
|
<ref name="concept"/>
|
|
1071
1181
|
<ref name="add"/>
|
|
@@ -1073,13 +1183,18 @@ parargaph sources are currently only rendered in metanorma-plateau</a:documentat
|
|
|
1073
1183
|
<ref name="span"/>
|
|
1074
1184
|
<ref name="erefstack"/>
|
|
1075
1185
|
<ref name="date_inline"/>
|
|
1186
|
+
<ref name="FormInput"/>
|
|
1187
|
+
<ref name="formlabel"/>
|
|
1076
1188
|
</choice>
|
|
1077
1189
|
</define>
|
|
1078
1190
|
<define name="PureTextElement" combine="choice">
|
|
1079
1191
|
<ref name="passthrough_inline"/>
|
|
1080
1192
|
</define>
|
|
1081
1193
|
<define name="NestedTextElement" combine="choice">
|
|
1082
|
-
<
|
|
1194
|
+
<choice>
|
|
1195
|
+
<ref name="erefstack"/>
|
|
1196
|
+
<ref name="concept"/>
|
|
1197
|
+
</choice>
|
|
1083
1198
|
</define>
|
|
1084
1199
|
<define name="passthrough_inline">
|
|
1085
1200
|
<a:documentation>Inline text not to be processed semantically, and left in the markup of a target rendering language (e.g. raw HTML)</a:documentation>
|
|
@@ -1227,9 +1342,26 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1227
1342
|
<ref name="termref">
|
|
1228
1343
|
<a:documentation>Link to a definition of the term in a termbase</a:documentation>
|
|
1229
1344
|
</ref>
|
|
1345
|
+
<ref name="errormsg">
|
|
1346
|
+
<a:documentation>Error message inserted by the Metanorma generator, replacing a concept reference
|
|
1347
|
+
that could not be resolved. Only ever emitted by Metanorma itself, never authored;
|
|
1348
|
+
its presence marks the document as not ready for publication</a:documentation>
|
|
1349
|
+
</ref>
|
|
1230
1350
|
</choice>
|
|
1231
1351
|
</element>
|
|
1232
1352
|
</define>
|
|
1353
|
+
<define name="errormsg">
|
|
1354
|
+
<a:documentation>Error message inserted by the Metanorma generator, replacing markup it could not process</a:documentation>
|
|
1355
|
+
<element name="errormsg">
|
|
1356
|
+
<zeroOrMore>
|
|
1357
|
+
<choice>
|
|
1358
|
+
<ref name="PureTextElement"/>
|
|
1359
|
+
<ref name="index"/>
|
|
1360
|
+
<ref name="index-xref"/>
|
|
1361
|
+
</choice>
|
|
1362
|
+
</zeroOrMore>
|
|
1363
|
+
</element>
|
|
1364
|
+
</define>
|
|
1233
1365
|
<define name="BasicBlock" combine="choice">
|
|
1234
1366
|
<choice>
|
|
1235
1367
|
<ref name="requirement"/>
|
|
@@ -1272,12 +1404,16 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1272
1404
|
<a:documentation>Input form, for use under HTML</a:documentation>
|
|
1273
1405
|
<element name="form">
|
|
1274
1406
|
<ref name="RequiredId"/>
|
|
1275
|
-
<
|
|
1276
|
-
<
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1407
|
+
<optional>
|
|
1408
|
+
<attribute name="name">
|
|
1409
|
+
<a:documentation>Name of the input form block</a:documentation>
|
|
1410
|
+
</attribute>
|
|
1411
|
+
</optional>
|
|
1412
|
+
<optional>
|
|
1413
|
+
<attribute name="action">
|
|
1414
|
+
<a:documentation>Action to be taken on submission of the input form</a:documentation>
|
|
1415
|
+
</attribute>
|
|
1416
|
+
</optional>
|
|
1281
1417
|
<optional>
|
|
1282
1418
|
<attribute name="class">
|
|
1283
1419
|
<a:documentation>Class of input form</a:documentation>
|
|
@@ -1289,8 +1425,13 @@ avoid duplicating the custom-class slot in BlockAttributes. Treated like
|
|
|
1289
1425
|
figure. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
1290
1426
|
</ref>
|
|
1291
1427
|
<zeroOrMore>
|
|
1292
|
-
<!--
|
|
1428
|
+
<!--
|
|
1429
|
+
Input form contents: as in HTML, a form contains block-level content,
|
|
1430
|
+
with form input elements appearing inline within it
|
|
1431
|
+
-->
|
|
1293
1432
|
<choice>
|
|
1433
|
+
<ref name="paragraph-with-footnote"/>
|
|
1434
|
+
<ref name="table"/>
|
|
1294
1435
|
<ref name="TextElement"/>
|
|
1295
1436
|
<ref name="FormInput"/>
|
|
1296
1437
|
<ref name="formlabel"/>
|
|
@@ -1734,14 +1875,18 @@ terms sections</a:documentation>
|
|
|
1734
1875
|
</ref>
|
|
1735
1876
|
</optional>
|
|
1736
1877
|
<oneOrMore>
|
|
1737
|
-
<
|
|
1878
|
+
<choice>
|
|
1738
1879
|
<ref name="BasicBlock">
|
|
1739
|
-
<a:documentation>Prefatory material
|
|
1880
|
+
<a:documentation>Prefatory or discursive material; a symbols section may consist of prose only,
|
|
1881
|
+
e.g. deferring to symbols defined in another standard</a:documentation>
|
|
1740
1882
|
</ref>
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1883
|
+
<ref name="dl">
|
|
1884
|
+
<a:documentation>Definition list(s) containing symbols and abbreviations</a:documentation>
|
|
1885
|
+
</ref>
|
|
1886
|
+
<ref name="definitions">
|
|
1887
|
+
<a:documentation>Subsections of the symbols section</a:documentation>
|
|
1888
|
+
</ref>
|
|
1889
|
+
</choice>
|
|
1745
1890
|
</oneOrMore>
|
|
1746
1891
|
</element>
|
|
1747
1892
|
</define>
|
|
@@ -2011,22 +2156,31 @@ used in document amendments</a:documentation>
|
|
|
2011
2156
|
<a:documentation>Type of relation of term applicable</a:documentation>
|
|
2012
2157
|
<ref name="RelatedTermType"/>
|
|
2013
2158
|
</attribute>
|
|
2014
|
-
<element name="preferred">
|
|
2015
|
-
<a:documentation>Preferred designation of the term related to the current term</a:documentation>
|
|
2016
|
-
<ref name="Designation"/>
|
|
2017
|
-
</element>
|
|
2018
2159
|
<choice>
|
|
2019
|
-
<
|
|
2020
|
-
<
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2160
|
+
<group>
|
|
2161
|
+
<element name="preferred">
|
|
2162
|
+
<a:documentation>Preferred designation of the term related to the current term</a:documentation>
|
|
2163
|
+
<ref name="Designation"/>
|
|
2164
|
+
</element>
|
|
2165
|
+
<choice>
|
|
2166
|
+
<ref name="eref">
|
|
2167
|
+
<a:documentation>Link to a definition of the term in a bibliographic entry</a:documentation>
|
|
2168
|
+
</ref>
|
|
2169
|
+
<ref name="erefstack">
|
|
2170
|
+
<a:documentation>Stack of links to a definition of the term in a bibliographic entry</a:documentation>
|
|
2171
|
+
</ref>
|
|
2172
|
+
<ref name="xref">
|
|
2173
|
+
<a:documentation>Link to a definition of the term in an element of the current document</a:documentation>
|
|
2174
|
+
</ref>
|
|
2175
|
+
<ref name="termref">
|
|
2176
|
+
<a:documentation>Link to a definition of the term in a termbase</a:documentation>
|
|
2177
|
+
</ref>
|
|
2178
|
+
</choice>
|
|
2179
|
+
</group>
|
|
2180
|
+
<ref name="errormsg">
|
|
2181
|
+
<a:documentation>Error message inserted by the Metanorma generator, replacing a related-term
|
|
2182
|
+
reference that could not be resolved. Only ever emitted by Metanorma itself,
|
|
2183
|
+
never authored; its presence marks the document as not ready for publication</a:documentation>
|
|
2030
2184
|
</ref>
|
|
2031
2185
|
</choice>
|
|
2032
2186
|
</element>
|
|
@@ -2177,16 +2331,21 @@ used in document amendments</a:documentation>
|
|
|
2177
2331
|
<data type="boolean"/>
|
|
2178
2332
|
</attribute>
|
|
2179
2333
|
</optional>
|
|
2180
|
-
<
|
|
2181
|
-
<
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2334
|
+
<oneOrMore>
|
|
2335
|
+
<element name="name">
|
|
2336
|
+
<a:documentation>The textual form of the designation. Repeated for language variants of the
|
|
2337
|
+
same designation: repetition of name with language attributes replaces the
|
|
2338
|
+
retired variant element (metanorma-standoc#940, metanorma-model-iso#155)</a:documentation>
|
|
2339
|
+
<ref name="LocalizedStringAttributes"/>
|
|
2340
|
+
<zeroOrMore>
|
|
2341
|
+
<choice>
|
|
2342
|
+
<ref name="PureTextElement"/>
|
|
2343
|
+
<ref name="index"/>
|
|
2344
|
+
<ref name="index-xref"/>
|
|
2345
|
+
</choice>
|
|
2346
|
+
</zeroOrMore>
|
|
2347
|
+
</element>
|
|
2348
|
+
</oneOrMore>
|
|
2190
2349
|
<optional>
|
|
2191
2350
|
<element name="abbreviation-type">
|
|
2192
2351
|
<a:documentation>Type of abbreviation that constitutes the designation, according to how it is formed</a:documentation>
|
|
@@ -2556,6 +2715,7 @@ to better fit some local requirement, though still with the intent of retaining
|
|
|
2556
2715
|
<value>sourcecode</value>
|
|
2557
2716
|
<value>example</value>
|
|
2558
2717
|
<value>note</value>
|
|
2718
|
+
<value>clause</value>
|
|
2559
2719
|
</choice>
|
|
2560
2720
|
</attribute>
|
|
2561
2721
|
<text>
|
data/lib/metanorma/ietf/reqt.rng
CHANGED
|
@@ -35,9 +35,12 @@ the tag name of the top level containers</a:documentation>
|
|
|
35
35
|
<ref name="ReqtObligationType"/>
|
|
36
36
|
</attribute>
|
|
37
37
|
</optional>
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
38
|
+
<ref name="RequiredId">
|
|
39
|
+
<a:documentation>Identification of provisions routed through the shared ID patterns,
|
|
40
|
+
like every other identified block: content GUID in `id`, with the
|
|
41
|
+
isodoc context adding the user-supplied `anchor` (e.g. Modspec
|
|
42
|
+
identifiers) and `source` (metanorma-model-iso#149)</a:documentation>
|
|
43
|
+
</ref>
|
|
41
44
|
<ref name="NumberingAttributes"/>
|
|
42
45
|
<ref name="BlockAttributesCore">
|
|
43
46
|
<a:documentation>requirement carries its own semantic `class` (provision class, below), so
|
|
@@ -126,6 +129,15 @@ interruption by other sub-containers</a:documentation>
|
|
|
126
129
|
<a:documentation>Provisions nested within this provision, which cannot be referenced autonomously and have
|
|
127
130
|
subclasses specific to the parent provision. Not expressed with provision metadata</a:documentation>
|
|
128
131
|
</ref>
|
|
132
|
+
<ref name="requirement">
|
|
133
|
+
<a:documentation>Provisions nested within this provision, which are self-standing and do not have
|
|
134
|
+
subclasses specific to the parent provision. Interleaved with the other
|
|
135
|
+
sub-containers: a requirements class alternates descriptions with its member
|
|
136
|
+
provisions, and descriptions resume after interruption
|
|
137
|
+
(metanorma-model-iso#160)</a:documentation>
|
|
138
|
+
</ref>
|
|
139
|
+
<ref name="recommendation"/>
|
|
140
|
+
<ref name="permission"/>
|
|
129
141
|
</choice>
|
|
130
142
|
</zeroOrMore>
|
|
131
143
|
<optional>
|
|
@@ -133,15 +145,17 @@ subclasses specific to the parent provision. Not expressed with provision metada
|
|
|
133
145
|
<a:documentation>A list of references for the requirement, following the Relaton model</a:documentation>
|
|
134
146
|
</ref>
|
|
135
147
|
</optional>
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
148
|
+
</define>
|
|
149
|
+
<define name="ExampleBodyContent" combine="choice">
|
|
150
|
+
<a:documentation>Provisions presented illustratively inside examples. This shape is
|
|
151
|
+
expected only in documents defining schemas and standards (e.g. the
|
|
152
|
+
Modspec specification exhibiting requirement boxes), not in
|
|
153
|
+
standards proper (metanorma-model-iso#160)</a:documentation>
|
|
154
|
+
<choice>
|
|
155
|
+
<ref name="requirement"/>
|
|
156
|
+
<ref name="recommendation"/>
|
|
157
|
+
<ref name="permission"/>
|
|
158
|
+
</choice>
|
|
145
159
|
</define>
|
|
146
160
|
<define name="reqtitle">
|
|
147
161
|
<element name="title">
|
|
@@ -214,6 +228,12 @@ subclasses specific to the parent provision</a:documentation>
|
|
|
214
228
|
mixture of the two.
|
|
215
229
|
A machine-readable component can be included as source code with
|
|
216
230
|
nomination of the language</a:documentation>
|
|
231
|
+
<ref name="OptionalId">
|
|
232
|
+
<a:documentation>Identification of subparts routed through the shared ID patterns
|
|
233
|
+
(metanorma-model-iso#149). Optional, not required: only some generator
|
|
234
|
+
pipelines (Modspec) stamp subparts with content GUIDs; others emit
|
|
235
|
+
description/specification/component without ids</a:documentation>
|
|
236
|
+
</ref>
|
|
217
237
|
<optional>
|
|
218
238
|
<attribute name="type">
|
|
219
239
|
<a:documentation>Type of sub-container.
|
data/lib/relaton/render/parse.rb
CHANGED
|
@@ -14,11 +14,18 @@ module Relaton
|
|
|
14
14
|
abstract: abstract(doc))
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def home_standard(
|
|
17
|
+
def home_standard(doc, pubs)
|
|
18
18
|
pubs&.any? do |r|
|
|
19
19
|
["Internet Engineering Task Force", "IETF", "RFC Publisher"]
|
|
20
20
|
.include?(r[:nonpersonal])
|
|
21
|
-
end
|
|
21
|
+
end ||
|
|
22
|
+
# an Internet-Draft is an IETF-stream document even though
|
|
23
|
+
# its relaton record carries no publisher contributor;
|
|
24
|
+
# without this, draft references fell to the refcontent
|
|
25
|
+
# branch and never got the seriesInfo that makes xml2rfc
|
|
26
|
+
# render "Work in Progress, Internet-Draft, ..." (#283)
|
|
27
|
+
Array(doc.docidentifier)
|
|
28
|
+
.any? { |i| i.type == "Internet-Draft" }
|
|
22
29
|
end
|
|
23
30
|
|
|
24
31
|
# allow publisher for standards
|
|
@@ -103,13 +110,17 @@ module Relaton
|
|
|
103
110
|
datepick(ret)
|
|
104
111
|
end
|
|
105
112
|
|
|
106
|
-
# return authors and editors together
|
|
113
|
+
# return authors and editors together, in DOCUMENT order:
|
|
114
|
+
# concatenating all authors then all editors re-ordered mixed
|
|
115
|
+
# lists — RFC 5234 (data order Crocker (ed.), Overell)
|
|
116
|
+
# rendered as "Overell, P. and D. Crocker", and organisational
|
|
117
|
+
# authors were hoisted over persons (#284)
|
|
107
118
|
def creatornames1(doc)
|
|
108
119
|
return [] if doc.nil?
|
|
109
120
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
121
|
+
cr = Array(doc.contributor).select do |c|
|
|
122
|
+
Array(c.role).any? { |r| %w(author editor).include?(r.type) }
|
|
123
|
+
end
|
|
113
124
|
cr.empty? or return cr
|
|
114
125
|
super
|
|
115
126
|
end
|
|
@@ -119,8 +130,26 @@ module Relaton
|
|
|
119
130
|
bcp = Array(doc.series).detect do |s|
|
|
120
131
|
%w(BCP STD).include?(Array(s.title).first&.content)
|
|
121
132
|
end
|
|
122
|
-
|
|
123
|
-
|
|
133
|
+
# label the sub-series by its own title: the unconditional
|
|
134
|
+
# "BCP" prefix rendered every STD-series RFC as BCP
|
|
135
|
+
# (STD 63 -> "BCP 63", #282)
|
|
136
|
+
bcp and ret.unshift(
|
|
137
|
+
"#{Array(bcp.title).first&.content}\u00A0#{bcp.number}",
|
|
138
|
+
)
|
|
139
|
+
# Internet-Draft identifiers stay: rejecting them (as the
|
|
140
|
+
# rfc-anchor internals rightly are) left draft references
|
|
141
|
+
# with NO seriesInfo, so xml2rfc never rendered "Work in
|
|
142
|
+
# Progress, Internet-Draft, draft-name" (#283). Only the
|
|
143
|
+
# unversioned duplicate of the primary id is dropped.
|
|
144
|
+
primary = ret.grep(/Internet-Draft/).max_by(&:length)
|
|
145
|
+
ret.reject do |x|
|
|
146
|
+
/rfc-anchor/.match?(x) ||
|
|
147
|
+
(/Internet-Draft/.match?(x) && x != primary) ||
|
|
148
|
+
# the I-D. anchor form duplicates the real draft name
|
|
149
|
+
# with an unprefixed, unversioned value — drop it when
|
|
150
|
+
# a proper Internet-Draft identifier is present
|
|
151
|
+
(primary && /I-D\./.match?(x))
|
|
152
|
+
end
|
|
124
153
|
.map { |x| x.gsub(/<\/?esc>/, "").tr(" ", "\u00A0") }
|
|
125
154
|
end
|
|
126
155
|
|
data/metanorma-ietf.gemspec
CHANGED
|
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
|
|
|
37
37
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.3.0")
|
|
38
38
|
|
|
39
39
|
spec.add_dependency "metanorma-ietf-data"
|
|
40
|
-
spec.add_dependency "metanorma-standoc", "~> 3.
|
|
40
|
+
spec.add_dependency "metanorma-standoc", "~> 3.5.0"
|
|
41
41
|
spec.add_dependency "relaton-render"
|
|
42
42
|
|
|
43
43
|
spec.add_development_dependency "canon" #, "= 0.2.3"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-ietf
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.7.
|
|
4
|
+
version: 3.7.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 3.
|
|
32
|
+
version: 3.5.0
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 3.
|
|
39
|
+
version: 3.5.0
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: relaton-render
|
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -334,7 +334,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
334
334
|
- !ruby/object:Gem::Version
|
|
335
335
|
version: '0'
|
|
336
336
|
requirements: []
|
|
337
|
-
rubygems_version: 4.0.
|
|
337
|
+
rubygems_version: 4.0.16
|
|
338
338
|
specification_version: 4
|
|
339
339
|
summary: metanorma-ietf lets you write IETF documents, such as Internet-Drafts and
|
|
340
340
|
RFCs, in AsciiDoc.
|