metanorma-nist 1.2.9 → 1.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -0
- data/.rubocop.yml +0 -4
- data/README.adoc +23 -3
- data/lib/asciidoctor/nist/basicdoc.rng +20 -3
- data/lib/asciidoctor/nist/boilerplate.rb +5 -3
- data/lib/asciidoctor/nist/cleanup.rb +4 -3
- data/lib/asciidoctor/nist/converter.rb +5 -2
- data/lib/asciidoctor/nist/front.rb +37 -46
- data/lib/asciidoctor/nist/front_id.rb +18 -7
- data/lib/asciidoctor/nist/isodoc.rng +118 -4
- data/lib/asciidoctor/nist/nist.rng +6 -0
- data/lib/asciidoctor/nist/nist_intro.xml +9 -9
- data/lib/asciidoctor/nist/nist_intro_cswp.xml +9 -9
- data/lib/asciidoctor/nist/validate.rb +17 -6
- data/lib/isodoc/nist/base_convert.rb +2 -3
- data/lib/isodoc/nist/html/header_cswp.html +2 -3
- data/lib/isodoc/nist/html/html_nist_titlepage.html +5 -3
- data/lib/isodoc/nist/html/word_nist_titlepage.html +8 -8
- data/lib/isodoc/nist/html/word_nist_titlepage_cswp.html +2 -0
- data/lib/isodoc/nist/html_convert.rb +6 -8
- data/lib/isodoc/nist/metadata.rb +28 -40
- data/lib/isodoc/nist/metadata_id.rb +3 -7
- data/lib/isodoc/nist/nist.csts.xsl +4844 -0
- data/lib/isodoc/nist/nist.cswp.xsl +477 -292
- data/lib/isodoc/nist/nist.sp.xsl +464 -327
- data/lib/isodoc/nist/pdf_convert.rb +5 -1
- data/lib/isodoc/nist/presentation_xml_convert.rb +30 -10
- data/lib/isodoc/nist/refs.rb +4 -20
- data/lib/isodoc/nist/render.rb +42 -40
- data/lib/isodoc/nist/render_dates.rb +8 -9
- data/lib/isodoc/nist/word_convert.rb +5 -6
- data/lib/isodoc/nist/xref.rb +11 -5
- data/lib/metanorma/nist/processor.rb +12 -0
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +2 -2
- metadata +8 -8
- data/lib/metanorma/nist/fonts_manifest.yaml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e78c8ae10f3132672926796f46dbf8878162307eff3397a4b3dcd851546bcfb
|
4
|
+
data.tar.gz: 495b6372624db9ae53eac0da0d007093728d643aea4b991317e9cc600846b8cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5188d91752f67dcf8f0ec293b3875d86fead17a0b4cd05738deb2c1c111dddeb29fea79dbb516766b820b8419f75d3633a5c0d09396be5d3af100e1fc3ef13a
|
7
|
+
data.tar.gz: 1106b9615698e0d044af2659c9c2d68c8ba152742586dbb6c64a7cfeb9fdbc679cd7139b149d69d0f0f6037af8f7d636666425bdfec20cfd672df68ed00bb968
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -299,7 +299,7 @@ Can be a number, or text (e.g. "initial", "final").
|
|
299
299
|
`:series:`:: The publication series that the document belongs to. Legal values are:
|
300
300
|
+
|
301
301
|
--
|
302
|
-
*
|
302
|
+
* nist-ams
|
303
303
|
* building-science
|
304
304
|
* nist-fips
|
305
305
|
* nist-gcr
|
@@ -321,11 +321,28 @@ Can be a number, or text (e.g. "initial", "final").
|
|
321
321
|
* csrc-use-case
|
322
322
|
* csrc-building-block
|
323
323
|
* nist-cswp
|
324
|
+
* nist-csts
|
324
325
|
--
|
325
326
|
|
326
327
|
Documents belonging to different series are expected to be rendered differently. As of this
|
327
|
-
writing, styling has been provided for `nist-cswp` (Cybersecurity White Papers)
|
328
|
-
`nist-sp` (SP-800).
|
328
|
+
writing, styling has been provided for `nist-cswp` (Cybersecurity White Papers),
|
329
|
+
`nist-csts` (Cybersecurity Technical Specifications, added in v1.2.10), and for `nist-sp` (SP-800).
|
330
|
+
|
331
|
+
`:series-title:`:: (Added in v1.2.10)
|
332
|
+
`:series-mrprefix:`:: (Added in v1.2.10)
|
333
|
+
`:series-abbrev:`:: (Added in v1.2.10) The formal documents published by NIST belong to a registered
|
334
|
+
list of series, each with a predefined title and abbreviation. Non-formal documents instead belong
|
335
|
+
to ad hoc series defined for the purposes of Metanorma, such as `nist-csts`. That particular series
|
336
|
+
acts as an umbrella for user-defined series of publications; so when it is used, the user needs to provide
|
337
|
+
a title (e.g. "Automated Cryptographic Validation Protocol") and abbreviation (e.g. ACVP) for the user-defined
|
338
|
+
series. The user also needs to provide the prefix by which the series will be identified in the machine-readable
|
339
|
+
NIST identifier, when it is at variance with the abbreviation.
|
340
|
+
+
|
341
|
+
--
|
342
|
+
In this case, CSTS is retained as the primary series of the publication (and all CSTS documents
|
343
|
+
are rendered the same way), and ACVP is modelled as a secondary series specific to CSTS. However,
|
344
|
+
the series information rendered for the document involves the user-defined series, not CSTS itself.
|
345
|
+
--
|
329
346
|
|
330
347
|
`:comment-from:`:: The beginning of the period during which comments may be submitted to the NIST
|
331
348
|
document draft. ISO-8601 date.
|
@@ -643,6 +660,9 @@ which will be converted to the tag `nistvariable` in Metanorma XML:
|
|
643
660
|
----
|
644
661
|
---
|
645
662
|
|
663
|
+
In the rest of Metanorma, `{{{ ... }}}` is used to introduce AsciiDoc markup into sourcecode.
|
664
|
+
In the NIST flavour, this is done through `{{{{ ... }}}}`
|
665
|
+
|
646
666
|
=== Errata
|
647
667
|
|
648
668
|
Errata are marked up as an Asciidoctor table with role attribute `[.errata]`.
|
@@ -729,12 +729,29 @@
|
|
729
729
|
</define>
|
730
730
|
<define name="index">
|
731
731
|
<element name="index">
|
732
|
-
<attribute name="primary"/>
|
733
732
|
<optional>
|
734
|
-
<attribute name="
|
733
|
+
<attribute name="to">
|
734
|
+
<data type="IDREF"/>
|
735
|
+
</attribute>
|
736
|
+
</optional>
|
737
|
+
<element name="primary">
|
738
|
+
<oneOrMore>
|
739
|
+
<ref name="PureTextElement"/>
|
740
|
+
</oneOrMore>
|
741
|
+
</element>
|
742
|
+
<optional>
|
743
|
+
<element name="secondary">
|
744
|
+
<oneOrMore>
|
745
|
+
<ref name="PureTextElement"/>
|
746
|
+
</oneOrMore>
|
747
|
+
</element>
|
735
748
|
</optional>
|
736
749
|
<optional>
|
737
|
-
<
|
750
|
+
<element name="tertiary">
|
751
|
+
<oneOrMore>
|
752
|
+
<ref name="PureTextElement"/>
|
753
|
+
</oneOrMore>
|
754
|
+
</element>
|
738
755
|
</optional>
|
739
756
|
</element>
|
740
757
|
</define>
|
@@ -24,6 +24,7 @@ module Asciidoctor
|
|
24
24
|
"csrc-use-case": "CSRC Use Case",
|
25
25
|
"csrc-building-block": "CSRC Building Block",
|
26
26
|
"nist-cswp": "NIST Cybersecurity White Paper",
|
27
|
+
"nist-csts": "NIST Cybersecurity Technical Specification",
|
27
28
|
}.freeze
|
28
29
|
|
29
30
|
SERIES_ABBR = {
|
@@ -49,6 +50,7 @@ module Asciidoctor
|
|
49
50
|
"csrc-use-case": "CSRC Use Case",
|
50
51
|
"csrc-building-block": "CSRC Building Block",
|
51
52
|
"nist-cswp": "NIST CSWP",
|
53
|
+
"nist-csts": "NIST CSTS",
|
52
54
|
}.freeze
|
53
55
|
|
54
56
|
CALL_FOR_PATENT_CLAIMS = <<~END.freeze
|
@@ -94,13 +96,13 @@ module Asciidoctor
|
|
94
96
|
|
95
97
|
def boilerplate_isodoc(xmldoc)
|
96
98
|
conv = super
|
97
|
-
conv.i18n.set(
|
98
|
-
conv.i18n.set(
|
99
|
+
conv.i18n.set("nist_division", @nistdivision)
|
100
|
+
conv.i18n.set("nist_division_address", @nistdivisionaddress)
|
99
101
|
conv
|
100
102
|
end
|
101
103
|
|
102
104
|
def boilerplate_file(xmldoc)
|
103
|
-
File.join(@libdir, @
|
105
|
+
File.join(@libdir, @cswp ? "nist_intro_cswp.xml" : "nist_intro.xml")
|
104
106
|
end
|
105
107
|
end
|
106
108
|
end
|
@@ -16,10 +16,11 @@ module Asciidoctor
|
|
16
16
|
xmldoc.xpath("//sourcecode").each do |x|
|
17
17
|
x.traverse do |n|
|
18
18
|
next unless n.text?
|
19
|
-
|
20
|
-
|
19
|
+
next unless /\{\{\{/.match(n.text)
|
20
|
+
n.replace(Nokogiri::XML::NodeSet.new(n.document, nistvariable_insert(n)))
|
21
21
|
end
|
22
22
|
end
|
23
|
+
super
|
23
24
|
end
|
24
25
|
|
25
26
|
# skip annex/terms/terms, which is empty node
|
@@ -72,7 +73,7 @@ module Asciidoctor
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def callforpatentclaims(x, preface)
|
75
|
-
return if @
|
76
|
+
return if @cswp
|
76
77
|
if @callforpatentclaims
|
77
78
|
docemail = x&.at("//uri[@type = 'email']")&.text || "???"
|
78
79
|
docnumber = x&.at("//docnumber")&.text || "???"
|
@@ -62,7 +62,7 @@ module Asciidoctor
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def olist(node)
|
65
|
-
id =
|
65
|
+
id = Metanorma::Utils::anchor_or_uuid(node)
|
66
66
|
noko do |xml|
|
67
67
|
xml.ol **attr_code(id: id, class: node.attr("class")) do |xml_ol|
|
68
68
|
node.items.each { |item| li(xml_ol, item) }
|
@@ -72,7 +72,7 @@ module Asciidoctor
|
|
72
72
|
|
73
73
|
def glossary(node)
|
74
74
|
noko do |xml|
|
75
|
-
xml.dl **{id:
|
75
|
+
xml.dl **{id: Metanorma::Utils::anchor_or_uuid(node),
|
76
76
|
type: "glossary"} do |xml_dl|
|
77
77
|
node.items.each do |terms, dd|
|
78
78
|
dt(terms, xml_dl)
|
@@ -103,7 +103,10 @@ module Asciidoctor
|
|
103
103
|
@nistdivisionaddress = node.attr("nist-division-address") ||
|
104
104
|
"100 Bureau Drive (Mail Stop 8930) Gaithersburg, MD 20899-8930"
|
105
105
|
@series = node.attr("series")
|
106
|
+
@cswp = %w(nist-cswp nist-csts).include?(@series)
|
106
107
|
super
|
108
|
+
@sourcecode_markup_start = node.attr("sourcecode-markup-start") || "{{{{"
|
109
|
+
@sourcecode_markup_end = node.attr("sourcecode-markup-end") || "}}}}"
|
107
110
|
end
|
108
111
|
|
109
112
|
def outputs(node, ret)
|
@@ -21,7 +21,7 @@ module Asciidoctor
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def asciidoc_sub(text)
|
24
|
-
|
24
|
+
Metanorma::Utils::asciidoc_sub(text)
|
25
25
|
end
|
26
26
|
|
27
27
|
def title_subtitle(node, t, at)
|
@@ -29,8 +29,7 @@ module Asciidoctor
|
|
29
29
|
t.title(**attr_code(at.merge(type: "subtitle"))) do |t1|
|
30
30
|
t1 << asciidoc_sub(node.attr("title-sub"))
|
31
31
|
end
|
32
|
-
node.attr("title-sub-short") and
|
33
|
-
t.title(**attr_code(at.merge(type: "short-subtitle"))) do |t1|
|
32
|
+
node.attr("title-sub-short") and t.title(**attr_code(at.merge(type: "short-subtitle"))) do |t1|
|
34
33
|
t1 << asciidoc_sub(node.attr("title-sub-short"))
|
35
34
|
end
|
36
35
|
end
|
@@ -46,8 +45,7 @@ module Asciidoctor
|
|
46
45
|
t.title(**attr_code(at.merge(type: "main"))) do |t1|
|
47
46
|
t1 << (asciidoc_sub(node.attr("title-main")) || node.title)
|
48
47
|
end
|
49
|
-
node.attr("title-main-short") and
|
50
|
-
t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
|
48
|
+
node.attr("title-main-short") and t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
|
51
49
|
t1 << asciidoc_sub(node.attr("title-main-short"))
|
52
50
|
end
|
53
51
|
end
|
@@ -85,21 +83,16 @@ module Asciidoctor
|
|
85
83
|
end
|
86
84
|
|
87
85
|
def metadata_committee(node, xml)
|
88
|
-
return unless node.attr("technical-committee") ||
|
89
|
-
node.attr("subcommittee") ||
|
86
|
+
return unless node.attr("technical-committee") || node.attr("subcommittee") ||
|
90
87
|
node.attr("workgroup") || node.attr("workinggroup")
|
91
88
|
xml.editorialgroup do |a|
|
92
|
-
node.attr("technical-committee") and
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
(node.attr("workgroup") || node.attr("workinggroup")) and
|
100
|
-
a.workgroup(node.attr("workgroup") || node.attr("workinggroup"),
|
101
|
-
**attr_code(type: node.attr("workgroup-type"),
|
102
|
-
number: node.attr("workgroup-number")))
|
89
|
+
c = node.attr("technical-committee") and a.committee(c)
|
90
|
+
c = node.attr("subcommittee") and
|
91
|
+
a.subcommittee(c, **attr_code(type: node.attr("subcommittee-type"),
|
92
|
+
number: node.attr("subcommittee-number")))
|
93
|
+
c = (node.attr("workgroup") || node.attr("workinggroup")) and
|
94
|
+
a.workgroup(c,
|
95
|
+
**attr_code(type: node.attr("workgroup-type"), number: node.attr("workgroup-number")))
|
103
96
|
end
|
104
97
|
end
|
105
98
|
|
@@ -114,16 +107,26 @@ module Asciidoctor
|
|
114
107
|
|
115
108
|
def metadata_source(node, xml)
|
116
109
|
super
|
117
|
-
node.attr("doc-email")
|
118
|
-
node.attr("doi")
|
110
|
+
node.attr("doc-email") and xml.uri(node.attr("doc-email"), type: "email")
|
111
|
+
node.attr("doi") and xml.uri(node.attr("doi"), type: "doi")
|
119
112
|
end
|
120
113
|
|
121
114
|
def metadata_series(node, xml)
|
122
115
|
series = node.attr("series") || "nist-sp"
|
123
116
|
series and xml.series **{ type: "main" } do |s|
|
124
117
|
s.title (SERIES.dig(series.to_sym) || series)
|
125
|
-
SERIES_ABBR.dig(series.to_sym) and
|
126
|
-
|
118
|
+
SERIES_ABBR.dig(series.to_sym) and s.abbreviation SERIES_ABBR.dig(series.to_sym)
|
119
|
+
end
|
120
|
+
metadata_subseries(node, xml)
|
121
|
+
end
|
122
|
+
|
123
|
+
def metadata_subseries(node, xml)
|
124
|
+
title = node.attr("series-title")
|
125
|
+
abbrev = node.attr("series-abbrev")
|
126
|
+
return unless (title || abbrev)
|
127
|
+
xml.series **{ type: "secondary" } do |s|
|
128
|
+
title and s.title title
|
129
|
+
abbrev and s.abbreviation abbrev
|
127
130
|
end
|
128
131
|
end
|
129
132
|
|
@@ -143,13 +146,11 @@ module Asciidoctor
|
|
143
146
|
end
|
144
147
|
|
145
148
|
def relaton_relation_descriptions
|
146
|
-
super.merge({ "supersedes" => "obsoletes",
|
147
|
-
"superseded-by" => "obsoleted-by", })
|
149
|
+
super.merge({ "supersedes" => "obsoletes", "superseded-by" => "obsoleted-by", })
|
148
150
|
end
|
149
151
|
|
150
152
|
def metadata_getrelation(node, xml, type, desc = nil)
|
151
|
-
if type == "obsoleted-by" and desc.nil? and
|
152
|
-
node.attr("superseding-status")
|
153
|
+
if type == "obsoleted-by" and desc.nil? and node.attr("superseding-status")
|
153
154
|
metadata_superseding_doc(node, xml)
|
154
155
|
end
|
155
156
|
super
|
@@ -166,29 +167,24 @@ module Asciidoctor
|
|
166
167
|
metadata_superseding_dates(b, node)
|
167
168
|
b.status do |s|
|
168
169
|
s.stage node.attr("superseding-status")
|
169
|
-
iter = node.attr("superseding-iteration") and
|
170
|
-
s.iteration iter
|
170
|
+
iter = node.attr("superseding-iteration") and s.iteration iter
|
171
171
|
end
|
172
172
|
end
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
176
|
def metadata_superseding_ids(b, xml)
|
177
|
-
did = xml&.parent&.at("./ancestor::bibdata/docidentifier"
|
178
|
-
|
179
|
-
didl = xml&.parent&.at("./ancestor::bibdata/docidentifier"\
|
180
|
-
"[@type = 'nist-long']")&.text
|
177
|
+
did = xml&.parent&.at("./ancestor::bibdata/docidentifier[@type = 'NIST']")&.text
|
178
|
+
didl = xml&.parent&.at("./ancestor::bibdata/docidentifier[@type = 'nist-long']")&.text
|
181
179
|
b.docidentifier did, **{ type: "NIST" }
|
182
180
|
b.docidentifier didl, **{ type: "nist-long" }
|
183
181
|
end
|
184
182
|
|
185
183
|
def metadata_superseding_dates(b, node)
|
186
|
-
cdate = node.attr("superseding-circulated-date") and
|
187
|
-
b.date **{ type: "circulated" } do |d|
|
184
|
+
cdate = node.attr("superseding-circulated-date") and b.date **{ type: "circulated" } do |d|
|
188
185
|
d.on cdate
|
189
186
|
end
|
190
|
-
cdate = node.attr("superseding-issued-date") and
|
191
|
-
b.date **{ type: "issued" } do |d|
|
187
|
+
cdate = node.attr("superseding-issued-date") and b.date **{ type: "issued" } do |d|
|
192
188
|
d.on cdate
|
193
189
|
end
|
194
190
|
end
|
@@ -198,24 +194,21 @@ module Asciidoctor
|
|
198
194
|
b.title **{ type: "main" } do |t|
|
199
195
|
t << asciidoc_sub(node.attr("superseding-title"))
|
200
196
|
end
|
201
|
-
node.attr("superseding-subtitle") and
|
202
|
-
b.title **{ type: "subtitle" } do |t|
|
197
|
+
node.attr("superseding-subtitle") and b.title **{ type: "subtitle" } do |t|
|
203
198
|
t << asciidoc_sub(node.attr("superseding-subtitle"))
|
204
199
|
end
|
205
200
|
else
|
206
201
|
b.title **{ type: "main" } do |t|
|
207
202
|
t << (asciidoc_sub(node.attr("title-main")) || node.title)
|
208
203
|
end
|
209
|
-
node.attr("title-sub") and
|
210
|
-
b.title **{ type: "subtitle" } do |t|
|
204
|
+
node.attr("title-sub") and b.title **{ type: "subtitle" } do |t|
|
211
205
|
t << asciidoc_sub(node.attr("title-sub"))
|
212
206
|
end
|
213
207
|
end
|
214
208
|
end
|
215
209
|
|
216
210
|
def metadata_superseding_authors(b, node)
|
217
|
-
node.attr("superseding-authors") and
|
218
|
-
node.attr("superseding-authors").split(/,\s*/).each do |a|
|
211
|
+
node.attr("superseding-authors") and node.attr("superseding-authors").split(/,\s*/).each do |a|
|
219
212
|
b.contributor do |c|
|
220
213
|
c.role nil, **{ type: "author" }
|
221
214
|
c.person do |p|
|
@@ -228,10 +221,8 @@ module Asciidoctor
|
|
228
221
|
end
|
229
222
|
|
230
223
|
def metadata_note(node, xml)
|
231
|
-
note = node.attr("bib-additional-note") and
|
232
|
-
|
233
|
-
note = node.attr("bib-withdrawal-note") and
|
234
|
-
xml.note note, **{ type: "withdrawal-note" }
|
224
|
+
note = node.attr("bib-additional-note") and xml.note note, **{ type: "additional-note" }
|
225
|
+
note = node.attr("bib-withdrawal-note") and xml.note note, **{ type: "withdrawal-note" }
|
235
226
|
note = node.attr("bib-withdrawal-announcement-link") and
|
236
227
|
xml.note note, **{ type: "withdrawal-announcement-link" }
|
237
228
|
end
|
@@ -24,6 +24,9 @@ module Asciidoctor
|
|
24
24
|
{
|
25
25
|
id: dn0,
|
26
26
|
series: node.attr("series"),
|
27
|
+
subseries: node.attr("series-title") || node.attr("series-abbrev"),
|
28
|
+
subseries_abbr: node.attr("series-abbrev"),
|
29
|
+
subseries_mr: node.attr("series-mrprefix") || node.attr("series-abbrev"),
|
27
30
|
edition: node.attr("edition"),
|
28
31
|
version: node.attr("version"),
|
29
32
|
revision: node.attr("revision"),
|
@@ -52,8 +55,7 @@ module Asciidoctor
|
|
52
55
|
else
|
53
56
|
args = id_args(node, dn0) || return
|
54
57
|
xml.docidentifier add_id_parts(args, false), **attr_code(type: "NIST")
|
55
|
-
xml.docidentifier add_id_parts(args, true),
|
56
|
-
**attr_code(type: "nist-long")
|
58
|
+
xml.docidentifier add_id_parts(args, true), **attr_code(type: "nist-long")
|
57
59
|
xml.docidentifier add_id_parts_mr(args), **attr_code(type: "nist-mr")
|
58
60
|
end
|
59
61
|
end
|
@@ -67,10 +69,20 @@ module Asciidoctor
|
|
67
69
|
IsoDoc::NIST::Metadata.new(nil, nil, @i18n).status_abbr(stage, iter)
|
68
70
|
end
|
69
71
|
|
72
|
+
def id_series_name(args, type)
|
73
|
+
if args[:series] == "nist-csts"
|
74
|
+
return ret = case type
|
75
|
+
when :long then args[:subseries]
|
76
|
+
when :short then args[:subseries_abbr]
|
77
|
+
when :mr then args[:subseries_mr]
|
78
|
+
end
|
79
|
+
end
|
80
|
+
type == :long ?
|
81
|
+
SERIES.dig(args[:series].to_sym) : SERIES_ABBR.dig(args[:series].to_sym)
|
82
|
+
end
|
83
|
+
|
70
84
|
def add_id_parts(args, long)
|
71
|
-
args[:series] and series_name = long ?
|
72
|
-
SERIES.dig(args[:series].to_sym) :
|
73
|
-
SERIES_ABBR.dig(args[:series].to_sym)
|
85
|
+
args[:series] and series_name = id_series_name(args, (long ? :long : :short))
|
74
86
|
dn = (series_name || "NIST #{args[:series]}") + " " + args[:id]
|
75
87
|
dn += " Volume #{args[:vol]}" if args[:vol]
|
76
88
|
dn += "," if args[:vol] && args[:revision]
|
@@ -107,8 +119,7 @@ module Asciidoctor
|
|
107
119
|
|
108
120
|
def add_id_parts_mr(args)
|
109
121
|
ret = ["NIST"]
|
110
|
-
args[:series] and
|
111
|
-
ret << SERIES_ABBR&.dig(args[:series].to_sym)&.sub(/^NIST /, "")
|
122
|
+
args[:series] and ret << id_series_name(args, :mr)&.sub(/^NIST /, "")
|
112
123
|
stage = status_abbr(args[:stage], nil) || ""
|
113
124
|
stage += "[-#{args[:iter]}]" if args[:iter]
|
114
125
|
ret << stage unless stage.empty?
|
@@ -55,6 +55,13 @@
|
|
55
55
|
<param name="pattern">\i\c*|\c+#\c+</param>
|
56
56
|
</data>
|
57
57
|
</attribute>
|
58
|
+
<optional>
|
59
|
+
<attribute name="to">
|
60
|
+
<data type="string">
|
61
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
62
|
+
</data>
|
63
|
+
</attribute>
|
64
|
+
</optional>
|
58
65
|
<optional>
|
59
66
|
<attribute name="type">
|
60
67
|
<ref name="ReferenceFormat"/>
|
@@ -246,6 +253,9 @@
|
|
246
253
|
<data type="boolean"/>
|
247
254
|
</attribute>
|
248
255
|
</optional>
|
256
|
+
<optional>
|
257
|
+
<attribute name="width"/>
|
258
|
+
</optional>
|
249
259
|
<optional>
|
250
260
|
<ref name="colgroup"/>
|
251
261
|
</optional>
|
@@ -779,6 +789,9 @@
|
|
779
789
|
<attribute name="width"/>
|
780
790
|
</element>
|
781
791
|
</define>
|
792
|
+
<define name="BibItemType" combine="choice">
|
793
|
+
<value>internal</value>
|
794
|
+
</define>
|
782
795
|
<define name="TextElement" combine="choice">
|
783
796
|
<ref name="concept"/>
|
784
797
|
</define>
|
@@ -799,6 +812,8 @@
|
|
799
812
|
<ref name="requirement"/>
|
800
813
|
<ref name="recommendation"/>
|
801
814
|
<ref name="permission"/>
|
815
|
+
<ref name="imagemap"/>
|
816
|
+
<ref name="svgmap"/>
|
802
817
|
</choice>
|
803
818
|
</define>
|
804
819
|
<define name="bibliography">
|
@@ -829,6 +844,9 @@
|
|
829
844
|
<data type="boolean"/>
|
830
845
|
</attribute>
|
831
846
|
</optional>
|
847
|
+
<optional>
|
848
|
+
<attribute name="number"/>
|
849
|
+
</optional>
|
832
850
|
<optional>
|
833
851
|
<attribute name="obligation">
|
834
852
|
<choice>
|
@@ -884,9 +902,11 @@
|
|
884
902
|
<element name="code">
|
885
903
|
<text/>
|
886
904
|
</element>
|
887
|
-
<
|
888
|
-
<text
|
889
|
-
|
905
|
+
<optional>
|
906
|
+
<element name="text">
|
907
|
+
<text/>
|
908
|
+
</element>
|
909
|
+
</optional>
|
890
910
|
</element>
|
891
911
|
</define>
|
892
912
|
<define name="standard-document">
|
@@ -899,6 +919,9 @@
|
|
899
919
|
</choice>
|
900
920
|
</attribute>
|
901
921
|
<ref name="bibdata"/>
|
922
|
+
<optional>
|
923
|
+
<ref name="misccontainer"/>
|
924
|
+
</optional>
|
902
925
|
<optional>
|
903
926
|
<ref name="boilerplate"/>
|
904
927
|
</optional>
|
@@ -909,11 +932,21 @@
|
|
909
932
|
<zeroOrMore>
|
910
933
|
<ref name="annex"/>
|
911
934
|
</zeroOrMore>
|
935
|
+
<optional>
|
936
|
+
<ref name="bibliography"/>
|
937
|
+
</optional>
|
912
938
|
<zeroOrMore>
|
913
|
-
<ref name="
|
939
|
+
<ref name="indexsect"/>
|
914
940
|
</zeroOrMore>
|
915
941
|
</element>
|
916
942
|
</define>
|
943
|
+
<define name="misccontainer">
|
944
|
+
<element name="misc-container">
|
945
|
+
<oneOrMore>
|
946
|
+
<ref name="AnyElement"/>
|
947
|
+
</oneOrMore>
|
948
|
+
</element>
|
949
|
+
</define>
|
917
950
|
<define name="preface">
|
918
951
|
<element name="preface">
|
919
952
|
<oneOrMore>
|
@@ -937,6 +970,11 @@
|
|
937
970
|
<ref name="Content-Section"/>
|
938
971
|
</element>
|
939
972
|
</define>
|
973
|
+
<define name="indexsect">
|
974
|
+
<element name="indexsect">
|
975
|
+
<ref name="Content-Section"/>
|
976
|
+
</element>
|
977
|
+
</define>
|
940
978
|
<define name="boilerplate">
|
941
979
|
<element name="boilerplate">
|
942
980
|
<optional>
|
@@ -1056,6 +1094,9 @@
|
|
1056
1094
|
</choice>
|
1057
1095
|
</attribute>
|
1058
1096
|
</optional>
|
1097
|
+
<optional>
|
1098
|
+
<attribute name="number"/>
|
1099
|
+
</optional>
|
1059
1100
|
<optional>
|
1060
1101
|
<attribute name="type"/>
|
1061
1102
|
</optional>
|
@@ -1109,6 +1150,9 @@
|
|
1109
1150
|
<optional>
|
1110
1151
|
<attribute name="type"/>
|
1111
1152
|
</optional>
|
1153
|
+
<optional>
|
1154
|
+
<attribute name="number"/>
|
1155
|
+
</optional>
|
1112
1156
|
<optional>
|
1113
1157
|
<ref name="section-title"/>
|
1114
1158
|
</optional>
|
@@ -1211,6 +1255,9 @@
|
|
1211
1255
|
<optional>
|
1212
1256
|
<attribute name="type"/>
|
1213
1257
|
</optional>
|
1258
|
+
<optional>
|
1259
|
+
<attribute name="number"/>
|
1260
|
+
</optional>
|
1214
1261
|
<optional>
|
1215
1262
|
<attribute name="obligation">
|
1216
1263
|
<choice>
|
@@ -1539,6 +1586,7 @@
|
|
1539
1586
|
<value>add</value>
|
1540
1587
|
<value>modify</value>
|
1541
1588
|
<value>delete</value>
|
1589
|
+
<value>replace</value>
|
1542
1590
|
</choice>
|
1543
1591
|
</attribute>
|
1544
1592
|
<optional>
|
@@ -1569,6 +1617,11 @@
|
|
1569
1617
|
</optional>
|
1570
1618
|
<optional>
|
1571
1619
|
<element name="newcontent">
|
1620
|
+
<optional>
|
1621
|
+
<attribute name="id">
|
1622
|
+
<data type="ID"/>
|
1623
|
+
</attribute>
|
1624
|
+
</optional>
|
1572
1625
|
<zeroOrMore>
|
1573
1626
|
<ref name="BasicBlock"/>
|
1574
1627
|
</zeroOrMore>
|
@@ -1602,4 +1655,65 @@
|
|
1602
1655
|
<text/>
|
1603
1656
|
</element>
|
1604
1657
|
</define>
|
1658
|
+
<define name="imagemap">
|
1659
|
+
<element name="imagemap">
|
1660
|
+
<ref name="figure"/>
|
1661
|
+
<zeroOrMore>
|
1662
|
+
<element name="area">
|
1663
|
+
<attribute name="type">
|
1664
|
+
<choice>
|
1665
|
+
<value>rect</value>
|
1666
|
+
<value>circle</value>
|
1667
|
+
<value>ellipse</value>
|
1668
|
+
<value>poly</value>
|
1669
|
+
</choice>
|
1670
|
+
</attribute>
|
1671
|
+
<choice>
|
1672
|
+
<ref name="xref"/>
|
1673
|
+
<ref name="hyperlink"/>
|
1674
|
+
<ref name="eref"/>
|
1675
|
+
</choice>
|
1676
|
+
<oneOrMore>
|
1677
|
+
<element name="coords">
|
1678
|
+
<attribute name="x">
|
1679
|
+
<data type="float"/>
|
1680
|
+
</attribute>
|
1681
|
+
<attribute name="y">
|
1682
|
+
<data type="float"/>
|
1683
|
+
</attribute>
|
1684
|
+
</element>
|
1685
|
+
</oneOrMore>
|
1686
|
+
<optional>
|
1687
|
+
<element name="radius">
|
1688
|
+
<attribute name="x">
|
1689
|
+
<data type="float"/>
|
1690
|
+
</attribute>
|
1691
|
+
<optional>
|
1692
|
+
<attribute name="y">
|
1693
|
+
<data type="float"/>
|
1694
|
+
</attribute>
|
1695
|
+
</optional>
|
1696
|
+
</element>
|
1697
|
+
</optional>
|
1698
|
+
</element>
|
1699
|
+
</zeroOrMore>
|
1700
|
+
</element>
|
1701
|
+
</define>
|
1702
|
+
<define name="svgmap">
|
1703
|
+
<element name="svgmap">
|
1704
|
+
<ref name="figure"/>
|
1705
|
+
<zeroOrMore>
|
1706
|
+
<element name="target">
|
1707
|
+
<attribute name="href">
|
1708
|
+
<data type="anyURI"/>
|
1709
|
+
</attribute>
|
1710
|
+
<choice>
|
1711
|
+
<ref name="xref"/>
|
1712
|
+
<ref name="hyperlink"/>
|
1713
|
+
<ref name="eref"/>
|
1714
|
+
</choice>
|
1715
|
+
</element>
|
1716
|
+
</zeroOrMore>
|
1717
|
+
</element>
|
1718
|
+
</define>
|
1605
1719
|
</grammar>
|