metanorma-nist 1.0.4 → 1.0.5
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/README.adoc +6 -0
- data/lib/asciidoctor/nist/biblio.rng +54 -6
- data/lib/asciidoctor/nist/front.rb +11 -5
- data/lib/isodoc/nist/base_convert.rb +2 -2
- data/lib/isodoc/nist/html/htmlstyle.scss +6 -3
- data/lib/isodoc/nist/html/word_nist_titlepage.html +1 -1
- data/lib/isodoc/nist/metadata.rb +2 -1
- data/lib/isodoc/nist/render.rb +20 -5
- data/lib/metanorma/nist/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: f758b64420197c62c491fb933d62fe0dde91fec5d9955d83e830a474160bfed0
|
4
|
+
data.tar.gz: 5b37fe1074ed0d62720af6e88dd08ffca4cb0c1f6eb1aeb256653e53c56c632e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e4d2b04a0ded879553796a90c5a88ca0b7537020b5b59c0b94823c504e0c8594ac35d5fa299efd454014b8a25c1a891b10c5e0a11847224e83e7f693780b264
|
7
|
+
data.tar.gz: 62c4a654c0d35e6e39104be8627d260650e2392e1ce3b61871747ccced61c38cd38a83d05e37073d82c7de320eeeb9b52096fa4ec7bcfaa00f38bf1c57d77af1
|
data/README.adoc
CHANGED
@@ -341,6 +341,12 @@ One or more NIST document that this NIST document standard supersedes; the super
|
|
341
341
|
document may still remain in effect. Comma delimited.
|
342
342
|
Format is document identifier, e.g. _SP 800-53A Rev. 1_
|
343
343
|
|
344
|
+
NOTE: The distinction between `obsoletes` and `supersedes` is the withdrawal date of the
|
345
|
+
original document (`obsoleted-date`); that means that the distinction is predictable given that external information.
|
346
|
+
The distinction between `obsoleted-by` and `superseded-by`, in the same way, is made by
|
347
|
+
the withdrawal date of the current document. Relaton does not differentiate between the two relations
|
348
|
+
for that reason.
|
349
|
+
|
344
350
|
`:superseded-by`::
|
345
351
|
One or more corresponding NIST document that this NIST document standard is superseded by;
|
346
352
|
this document may still remain in effect. Comma delimited.
|
@@ -49,11 +49,17 @@
|
|
49
49
|
</define>
|
50
50
|
<define name="stage">
|
51
51
|
<element name="stage">
|
52
|
+
<optional>
|
53
|
+
<attribute name="abbreviation"/>
|
54
|
+
</optional>
|
52
55
|
<text/>
|
53
56
|
</element>
|
54
57
|
</define>
|
55
58
|
<define name="substage">
|
56
59
|
<element name="substage">
|
60
|
+
<optional>
|
61
|
+
<attribute name="abbreviation"/>
|
62
|
+
</optional>
|
57
63
|
<text/>
|
58
64
|
</element>
|
59
65
|
</define>
|
@@ -452,9 +458,14 @@
|
|
452
458
|
<attribute name="bibitemid">
|
453
459
|
<data type="IDREF"/>
|
454
460
|
</attribute>
|
455
|
-
<
|
456
|
-
<
|
457
|
-
|
461
|
+
<choice>
|
462
|
+
<zeroOrMore>
|
463
|
+
<ref name="locality"/>
|
464
|
+
</zeroOrMore>
|
465
|
+
<zeroOrMore>
|
466
|
+
<ref name="localityStack"/>
|
467
|
+
</zeroOrMore>
|
468
|
+
</choice>
|
458
469
|
<optional>
|
459
470
|
<ref name="date"/>
|
460
471
|
</optional>
|
@@ -469,6 +480,25 @@
|
|
469
480
|
<ref name="BibItemLocality"/>
|
470
481
|
</element>
|
471
482
|
</define>
|
483
|
+
<define name="localityStack">
|
484
|
+
<element name="localityStack">
|
485
|
+
<zeroOrMore>
|
486
|
+
<ref name="locality"/>
|
487
|
+
</zeroOrMore>
|
488
|
+
</element>
|
489
|
+
</define>
|
490
|
+
<define name="sourceLocality">
|
491
|
+
<element name="sourceLocality">
|
492
|
+
<ref name="BibItemLocality"/>
|
493
|
+
</element>
|
494
|
+
</define>
|
495
|
+
<define name="sourceLocalityStack">
|
496
|
+
<element name="sourceLocalityStack">
|
497
|
+
<zeroOrMore>
|
498
|
+
<ref name="sourceLocality"/>
|
499
|
+
</zeroOrMore>
|
500
|
+
</element>
|
501
|
+
</define>
|
472
502
|
<define name="BibItemLocality">
|
473
503
|
<attribute name="type">
|
474
504
|
<ref name="LocalityType"/>
|
@@ -1028,12 +1058,30 @@
|
|
1028
1058
|
<attribute name="type">
|
1029
1059
|
<ref name="DocRelationType"/>
|
1030
1060
|
</attribute>
|
1061
|
+
<optional>
|
1062
|
+
<element name="description">
|
1063
|
+
<ref name="FormattedString"/>
|
1064
|
+
</element>
|
1065
|
+
</optional>
|
1031
1066
|
<element name="bibitem">
|
1032
1067
|
<ref name="BibliographicItem"/>
|
1033
1068
|
</element>
|
1034
|
-
<
|
1035
|
-
<
|
1036
|
-
|
1069
|
+
<choice>
|
1070
|
+
<zeroOrMore>
|
1071
|
+
<ref name="locality"/>
|
1072
|
+
</zeroOrMore>
|
1073
|
+
<zeroOrMore>
|
1074
|
+
<ref name="localityStack"/>
|
1075
|
+
</zeroOrMore>
|
1076
|
+
</choice>
|
1077
|
+
<choice>
|
1078
|
+
<zeroOrMore>
|
1079
|
+
<ref name="sourceLocality"/>
|
1080
|
+
</zeroOrMore>
|
1081
|
+
<zeroOrMore>
|
1082
|
+
<ref name="sourceLocalityStack"/>
|
1083
|
+
</zeroOrMore>
|
1084
|
+
</choice>
|
1037
1085
|
</element>
|
1038
1086
|
</define>
|
1039
1087
|
<define name="version">
|
@@ -144,15 +144,21 @@ module Asciidoctor
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def relaton_relations
|
147
|
-
super + %w(obsoletes obsoleted-by
|
147
|
+
super + %w(obsoletes obsoleted-by)
|
148
148
|
end
|
149
149
|
|
150
|
-
def
|
151
|
-
|
150
|
+
def relaton_relation_descriptions
|
151
|
+
super.merge({
|
152
|
+
"supersedes" => "obsoletes",
|
153
|
+
"superseded-by" => "obsoleted-by",
|
154
|
+
})
|
155
|
+
end
|
156
|
+
|
157
|
+
def metadata_getrelation(node, xml, type, desc = nil)
|
158
|
+
if type == "obsoleted-by" and desc.nil? and node.attr("superseding-status")
|
152
159
|
metadata_superseding_doc(node, xml)
|
153
|
-
else
|
154
|
-
super
|
155
160
|
end
|
161
|
+
super
|
156
162
|
end
|
157
163
|
|
158
164
|
def metadata_superseding_doc(node, xml)
|
@@ -177,8 +177,8 @@ module IsoDoc
|
|
177
177
|
|
178
178
|
def get_linkend(node)
|
179
179
|
link = anchor_linkend(node, docid_l10n(node["target"] || wrap_brackets(node['citeas'])))
|
180
|
-
link += eref_localities(node.xpath(ns("./locality")), link)
|
181
|
-
contents = node.children.select { |c| c.name
|
180
|
+
link += eref_localities(node.xpath(ns("./locality | ./localityStack")), link)
|
181
|
+
contents = node.children.select { |c| %w{locality localityStack}.include? c.name }
|
182
182
|
return link if contents.nil? || contents.empty?
|
183
183
|
Nokogiri::XML::NodeSet.new(node.document, contents).to_xml
|
184
184
|
# so not <origin bibitemid="ISO7301" citeas="ISO 7301">
|
@@ -105,9 +105,12 @@ span.nistvariable {
|
|
105
105
|
}
|
106
106
|
|
107
107
|
.document-type-band {
|
108
|
-
@include docBand(
|
109
|
-
$
|
110
|
-
|
108
|
+
@include docBand($fontFamily: "'Source Sans Pro', sans-serif",
|
109
|
+
$order: 2, $offset: 180px, $color: #7ba812);
|
110
|
+
|
111
|
+
.document-type {
|
112
|
+
top: 20px;
|
113
|
+
}
|
111
114
|
}
|
112
115
|
|
113
116
|
#governance-band p.document-type {
|
@@ -845,7 +845,7 @@ style='width:477.0pt;margin-left:-5.25pt;border-collapse:collapse;border:none;ms
|
|
845
845
|
padding:0cm 5.4pt 0cm 5.4pt'>
|
846
846
|
<p class="Default"><span lang="EN-US" style='font-size:11.0pt;font-family:"Calibri",sans-serif;
|
847
847
|
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin;mso-bidi-font-family:
|
848
|
-
"Times New Roman";color:black;mso-themecolor:text1'>{{
|
848
|
+
"Times New Roman";color:black;mso-themecolor:text1'>{{ superseding_issued_date }}<o:p></o:p></span></p>
|
849
849
|
</td>
|
850
850
|
</tr>
|
851
851
|
<tr style='mso-yfti-irow:13'>
|
data/lib/isodoc/nist/metadata.rb
CHANGED
@@ -147,7 +147,8 @@ module IsoDoc
|
|
147
147
|
|
148
148
|
def relations1(ixml, type)
|
149
149
|
ret = []
|
150
|
-
ixml.xpath(ns("//bibdata/relation[@type = '#{type}']
|
150
|
+
ixml.xpath(ns("//bibdata/relation[@type = '#{type}'][not(xmlns:description)] | "\
|
151
|
+
"//bibdata/relation[description = '#{type}']")).each do |x|
|
151
152
|
id = x&.at(ns(".//docidentifier"))&.text and ret << id
|
152
153
|
end
|
153
154
|
ret
|
data/lib/isodoc/nist/render.rb
CHANGED
@@ -134,7 +134,7 @@ module Iso690Render
|
|
134
134
|
"book"
|
135
135
|
end
|
136
136
|
|
137
|
-
def self.
|
137
|
+
def self.extent2(type, from, to)
|
138
138
|
ret = ""
|
139
139
|
case type
|
140
140
|
when "page" then type = to ? "pp." : "p."
|
@@ -146,15 +146,31 @@ module Iso690Render
|
|
146
146
|
ret
|
147
147
|
end
|
148
148
|
|
149
|
-
def self.
|
149
|
+
def self.extent1(localities)
|
150
150
|
ret = []
|
151
151
|
localities.each do |l|
|
152
|
-
ret <<
|
152
|
+
ret << extent2(l["type"] || "page",
|
153
153
|
l.at("./referenceFrom"), l.at("./referenceTo"))
|
154
154
|
end
|
155
155
|
ret.join(", ")
|
156
156
|
end
|
157
157
|
|
158
|
+
def self.extent(localities)
|
159
|
+
ret = []
|
160
|
+
ret1 = ""
|
161
|
+
localities.each do |l|
|
162
|
+
if %w(localityStack).include? l.name
|
163
|
+
ret << ret1
|
164
|
+
ret1 = ""
|
165
|
+
ret << extent1(l.children)
|
166
|
+
else
|
167
|
+
ret1 += extent1([l])
|
168
|
+
end
|
169
|
+
end
|
170
|
+
ret << ret1
|
171
|
+
ret.reject { |c| c.empty? }.join("; ")
|
172
|
+
end
|
173
|
+
|
158
174
|
def self.draft(doc)
|
159
175
|
return nil unless is_nist(doc)
|
160
176
|
dr = doc&.at("./status/stage")&.text
|
@@ -228,8 +244,7 @@ module Iso690Render
|
|
228
244
|
ret += wrap(accessLocation(doc), " At: ", ".")
|
229
245
|
if container
|
230
246
|
ret += wrap(parse(container.at("./bibitem"), true), " In: ", "")
|
231
|
-
locality =
|
232
|
-
locality.empty? and locality = doc.xpath("./extent")
|
247
|
+
locality = doc.xpath("./extent")
|
233
248
|
ret += wrap(extent(locality))
|
234
249
|
else
|
235
250
|
ret += wrap(extent(doc.xpath("./extent")))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|