relaton-nist 1.0.0 → 1.2.1
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/grammars/biblio.rng +89 -32
- data/grammars/isodoc.rng +450 -4
- data/lib/relaton_nist/document_relation.rb +5 -0
- data/lib/relaton_nist/hash_converter.rb +24 -0
- data/lib/relaton_nist/nist_bibliographic_item.rb +6 -5
- data/lib/relaton_nist/nist_bibliography.rb +1 -0
- data/lib/relaton_nist/scrapper.rb +35 -20
- data/lib/relaton_nist/version.rb +1 -1
- data/relaton_nist.gemspec +1 -1
- metadata +5 -5
- data/grammars/isostandard.rng +0 -522
@@ -15,11 +15,35 @@ module RelatonNist
|
|
15
15
|
|
16
16
|
private
|
17
17
|
|
18
|
+
# @param item_hash [Hash]
|
19
|
+
# @return [RelatonNist::NistBibliographicItem]
|
20
|
+
def bib_item(item_hash)
|
21
|
+
NistBibliographicItem.new item_hash
|
22
|
+
end
|
23
|
+
|
18
24
|
def commentperiod_hash_to_bib(ret)
|
19
25
|
return unless ret[:commentperiod]
|
20
26
|
|
21
27
|
ret[:commentperiod] = CommentPeriod.new ret[:commentperiod]
|
22
28
|
end
|
29
|
+
|
30
|
+
# @param ret [Hash]
|
31
|
+
def relations_hash_to_bib(ret)
|
32
|
+
super
|
33
|
+
return unless ret[:relation]
|
34
|
+
|
35
|
+
ret[:relation] = ret[:relation].map { |r| DocumentRelation.new r }
|
36
|
+
|
37
|
+
# ret[:relation] = array(ret[:relation])
|
38
|
+
# ret[:relation]&.each do |r|
|
39
|
+
# if r[:description]
|
40
|
+
# r[:description] = FormattedString.new r[:description]
|
41
|
+
# end
|
42
|
+
# relation_bibitem_hash_to_bib(r)
|
43
|
+
# relation_locality_hash_to_bib(r)
|
44
|
+
# relation_source_locality_hash_to_bib(r)
|
45
|
+
# end
|
46
|
+
end
|
23
47
|
end
|
24
48
|
end
|
25
49
|
end
|
@@ -30,7 +30,7 @@ module RelatonNist
|
|
30
30
|
# @param validity [RelatonBib:Validity, NilClass]
|
31
31
|
# @param fetched [Date, NilClass] default nil
|
32
32
|
# @param doctype [String]
|
33
|
-
# @param keyword [Array<
|
33
|
+
# @param keyword [Array<RelatonBib::Keyword>]
|
34
34
|
# @param commentperiod [RelatonNist::CommentPeriod, NilClass]
|
35
35
|
#
|
36
36
|
# @param date [Array<Hash>]
|
@@ -51,12 +51,13 @@ module RelatonNist
|
|
51
51
|
# @option abstract [String] :script
|
52
52
|
# @option abstract [String] :type
|
53
53
|
#
|
54
|
-
# @param relation [Array<Hash>]
|
54
|
+
# @param relation [Array<Hash, RelatonNist::DocumentRelation>]
|
55
55
|
# @option relation [String] :type
|
56
56
|
# @option relation [RelatonBib::BibliographicItem] :bibitem
|
57
57
|
# @option relation [Array<RelatonBib::BibItemLocality>] :bib_locality
|
58
58
|
def initialize(**args)
|
59
|
-
@doctype = args.delete(:doctype) || "standard"
|
59
|
+
# @doctype = args.delete(:doctype) || "standard"
|
60
|
+
# args[:doctype] ||= "standard"
|
60
61
|
# @keyword = args.delete(:keyword) || []
|
61
62
|
@commentperiod = args.delete :commentperiod
|
62
63
|
super
|
@@ -67,8 +68,8 @@ module RelatonNist
|
|
67
68
|
super builder, date_format: :short, **opts do |b|
|
68
69
|
if opts[:bibdata]
|
69
70
|
b.ext do
|
70
|
-
b.doctype doctype
|
71
|
-
# keyword.each { |kw| kw.to_xml b }
|
71
|
+
b.doctype doctype if doctype
|
72
|
+
# keyword.each { |kw| b.keyword { kw.to_xml b } }
|
72
73
|
commentperiod&.to_xml b
|
73
74
|
end
|
74
75
|
end
|
@@ -16,10 +16,10 @@ module RelatonNist
|
|
16
16
|
else
|
17
17
|
from_csrs hit_data
|
18
18
|
end
|
19
|
-
doctype = "standard"
|
19
|
+
# doctype = "standard"
|
20
20
|
titles = fetch_titles(hit_data)
|
21
21
|
unless /^(SP|NISTIR|FIPS) / =~ item_data[:docid][0].id
|
22
|
-
doctype = id_cleanup(item_data[:docid][0].id)
|
22
|
+
# doctype = id_cleanup(item_data[:docid][0].id)
|
23
23
|
item_data[:docid][0] = RelatonBib::DocumentIdentifier.new(
|
24
24
|
id: titles[0][:content].upcase, type: "NIST",
|
25
25
|
)
|
@@ -78,9 +78,9 @@ module RelatonNist
|
|
78
78
|
# Strip status from doc id
|
79
79
|
# @param id String
|
80
80
|
# @return String
|
81
|
-
def id_cleanup(id)
|
82
|
-
|
83
|
-
end
|
81
|
+
# def id_cleanup(id)
|
82
|
+
# id.sub(/ \(WITHDRAWN\)/, "").sub(/ \(([^) ]+ )?DRAFT\)/i, "")
|
83
|
+
# end
|
84
84
|
|
85
85
|
# Get page.
|
86
86
|
# @param path [String] page's path
|
@@ -235,15 +235,18 @@ module RelatonNist
|
|
235
235
|
)
|
236
236
|
end
|
237
237
|
if contr["surname"]
|
238
|
-
affiliation =
|
238
|
+
affiliation = []
|
239
|
+
affiliation << RelatonBib::Affiliation.new(organization: org) if org
|
239
240
|
entity = RelatonBib::Person.new(
|
240
|
-
name: full_name(contr, lang, script), affiliation:
|
241
|
+
name: full_name(contr, lang, script), affiliation: affiliation,
|
241
242
|
)
|
242
|
-
|
243
|
+
elsif org
|
243
244
|
entity = org
|
244
245
|
end
|
245
|
-
|
246
|
-
|
246
|
+
if entity
|
247
|
+
RelatonBib::ContributionInfo.new entity: entity, role: [type: role]
|
248
|
+
end
|
249
|
+
end.compact
|
247
250
|
end
|
248
251
|
|
249
252
|
# rubocop:disable Metrics/CyclomaticComplexity
|
@@ -304,7 +307,7 @@ module RelatonNist
|
|
304
307
|
def name_parts(part, lang, script)
|
305
308
|
return [] unless part
|
306
309
|
|
307
|
-
[RelatonBib::LocalizedString.new(
|
310
|
+
[RelatonBib::LocalizedString.new(part, lang, script)]
|
308
311
|
end
|
309
312
|
|
310
313
|
# @param doc [String, Hash]
|
@@ -325,7 +328,9 @@ module RelatonNist
|
|
325
328
|
# @param doc [Nokigiri::HTML::Document]
|
326
329
|
# @return [Array<Hash>]
|
327
330
|
def fetch_abstract(doc)
|
328
|
-
abstract_content = doc.xpath(
|
331
|
+
abstract_content = doc.xpath(
|
332
|
+
'//div[contains(@class, "pub-abstract-callout")]/div[1]/p',
|
333
|
+
).text
|
329
334
|
[{
|
330
335
|
content: abstract_content,
|
331
336
|
language: "en",
|
@@ -336,7 +341,7 @@ module RelatonNist
|
|
336
341
|
|
337
342
|
# Fetch copyright.
|
338
343
|
# @param doc [Nokogiri::HTL::Document, String]
|
339
|
-
# @return [Hash]
|
344
|
+
# @return [Array<Hash>]
|
340
345
|
def fetch_copyright(doc)
|
341
346
|
name = "National Institute of Standards and Technology"
|
342
347
|
url = "www.nist.gov"
|
@@ -345,9 +350,11 @@ module RelatonNist
|
|
345
350
|
doc.at("//span[@id='pub-release-date']").text.strip
|
346
351
|
end
|
347
352
|
from = d.match(/\d{4}/).to_s
|
348
|
-
{ owner: { name: name, abbreviation: "NIST", url: url }, from: from }
|
353
|
+
[{ owner: [{ name: name, abbreviation: "NIST", url: url }], from: from }]
|
349
354
|
end
|
350
355
|
|
356
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
357
|
+
|
351
358
|
# Fetch links.
|
352
359
|
# @param doc [Nokogiri::HTML::Document, Hash]
|
353
360
|
# @return [Array<Hash>]
|
@@ -365,10 +372,11 @@ module RelatonNist
|
|
365
372
|
links << { type: "doi", content: doi } if doi
|
366
373
|
links
|
367
374
|
end
|
375
|
+
# rubocop:enable Metrics/MethodLength
|
368
376
|
|
369
377
|
# Fetch relations.
|
370
378
|
# @param doc [Nokogiri::HTML::Document]
|
371
|
-
# @return [Array<
|
379
|
+
# @return [Array<RelatonNist::DocumentRelation>]
|
372
380
|
def fetch_relations(doc)
|
373
381
|
relations = doc.xpath('//span[@id="pub-supersedes-container"]/a').map do |r|
|
374
382
|
doc_relation "supersedes", r.text, DOMAIN + r[:href]
|
@@ -382,6 +390,7 @@ module RelatonNist
|
|
382
390
|
doc_relation "updates", r.text, DOMAIN + r[:href]
|
383
391
|
end
|
384
392
|
end
|
393
|
+
# rubocop:enable Metrics/AbcSize
|
385
394
|
|
386
395
|
def fetch_relations_json(doc)
|
387
396
|
relations = doc["supersedes"].map do |r|
|
@@ -396,9 +405,9 @@ module RelatonNist
|
|
396
405
|
# @param type [String]
|
397
406
|
# @param ref [String]
|
398
407
|
# @param uri [String]
|
399
|
-
# @return [
|
408
|
+
# @return [RelatonNist::DocumentRelation]
|
400
409
|
def doc_relation(type, ref, uri, lang = "en", script = "Latn")
|
401
|
-
|
410
|
+
DocumentRelation.new(
|
402
411
|
type: type,
|
403
412
|
bibitem: RelatonBib::BibliographicItem.new(
|
404
413
|
formattedref: RelatonBib::FormattedRef.new(
|
@@ -409,6 +418,8 @@ module RelatonNist
|
|
409
418
|
)
|
410
419
|
end
|
411
420
|
|
421
|
+
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
422
|
+
|
412
423
|
# @param doc [Nokogiri::HTML::Document]
|
413
424
|
# @return [Array<RelatonBib::Series>]
|
414
425
|
def fetch_series(doc)
|
@@ -418,14 +429,14 @@ module RelatonNist
|
|
418
429
|
next if s.name == "span"
|
419
430
|
|
420
431
|
iter = if idx.zero? then "I"
|
421
|
-
# elsif status == "final" && idx == (series.size - 1) then "F"
|
422
432
|
else idx + 1
|
423
433
|
end
|
424
434
|
|
425
435
|
content = s.text.match(/^[^\(]+/).to_s.strip.squeeze " "
|
426
436
|
|
427
437
|
ref = case s.text
|
428
|
-
when /^Draft/
|
438
|
+
when /^Draft/
|
439
|
+
content.match(/(?<=Draft\s).+/).to_s + " (#{iter}PD)"
|
429
440
|
when /\(Draft\)/ then content + " (#{iter}PD)"
|
430
441
|
else content
|
431
442
|
end
|
@@ -436,6 +447,7 @@ module RelatonNist
|
|
436
447
|
RelatonBib::Series.new(formattedref: fref)
|
437
448
|
end.select { |s| s }
|
438
449
|
end
|
450
|
+
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
439
451
|
|
440
452
|
# @param doc [Nokogiri::HTML::Document, Hash]
|
441
453
|
# @return [Array<RelatonNist::Keyword>]
|
@@ -448,6 +460,7 @@ module RelatonNist
|
|
448
460
|
kws.map { |kw| kw.is_a?(String) ? kw : kw.text }
|
449
461
|
end
|
450
462
|
|
463
|
+
# rubocop:disable Metrics/AbcSize
|
451
464
|
# @param doc [Nokogiri::HTML::Document]
|
452
465
|
# @return [RelatonNist::CommentPeriod, NilClass]
|
453
466
|
def fetch_commentperiod(doc)
|
@@ -459,11 +472,13 @@ module RelatonNist
|
|
459
472
|
d = doc.at("//span[@id='pub-release-date']").text.strip
|
460
473
|
from = Date.strptime(d, "%B %Y").to_s
|
461
474
|
|
462
|
-
ex = doc.at "//strong[contains(.,'The comment closing date has been
|
475
|
+
ex = doc.at "//strong[contains(.,'The comment closing date has been "\
|
476
|
+
"extended to')]"
|
463
477
|
ext = ex&.text&.match(/\w+\s\d{2},\s\d{4}/).to_s
|
464
478
|
extended = ext.empty? ? nil : Date.strptime(ext, "%B %d, %Y")
|
465
479
|
CommentPeriod.new from: from, to: to, extended: extended
|
466
480
|
end
|
481
|
+
# rubocop:enable Metrics/AbcSize
|
467
482
|
|
468
483
|
# @param json [Hash]
|
469
484
|
# @return [RelatonNist::CommentPeriod, NilClass]
|
data/lib/relaton_nist/version.rb
CHANGED
data/relaton_nist.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-nist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.1
|
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-
|
11
|
+
date: 2020-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -156,14 +156,14 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.2.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.2.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubyzip
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,11 +200,11 @@ files:
|
|
200
200
|
- grammars/basicdoc.rng
|
201
201
|
- grammars/biblio.rng
|
202
202
|
- grammars/isodoc.rng
|
203
|
-
- grammars/isostandard.rng
|
204
203
|
- grammars/nist.rng
|
205
204
|
- grammars/reqt.rng
|
206
205
|
- lib/relaton_nist.rb
|
207
206
|
- lib/relaton_nist/comment_period.rb
|
207
|
+
- lib/relaton_nist/document_relation.rb
|
208
208
|
- lib/relaton_nist/document_status.rb
|
209
209
|
- lib/relaton_nist/hash_converter.rb
|
210
210
|
- lib/relaton_nist/hit.rb
|
data/grammars/isostandard.rng
DELETED
@@ -1,522 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
|
4
|
-
<include href="isodoc.rng">
|
5
|
-
<start>
|
6
|
-
<ref name="iso-standard"/>
|
7
|
-
</start>
|
8
|
-
<define name="organization">
|
9
|
-
<element name="organization">
|
10
|
-
<oneOrMore>
|
11
|
-
<ref name="orgname"/>
|
12
|
-
</oneOrMore>
|
13
|
-
<optional>
|
14
|
-
<ref name="abbreviation"/>
|
15
|
-
</optional>
|
16
|
-
<optional>
|
17
|
-
<ref name="uri"/>
|
18
|
-
</optional>
|
19
|
-
<zeroOrMore>
|
20
|
-
<ref name="org-identifier"/>
|
21
|
-
</zeroOrMore>
|
22
|
-
<zeroOrMore>
|
23
|
-
<ref name="contact"/>
|
24
|
-
</zeroOrMore>
|
25
|
-
<optional>
|
26
|
-
<ref name="technical-committee"/>
|
27
|
-
</optional>
|
28
|
-
<optional>
|
29
|
-
<ref name="subcommittee"/>
|
30
|
-
</optional>
|
31
|
-
<optional>
|
32
|
-
<ref name="workgroup"/>
|
33
|
-
</optional>
|
34
|
-
<optional>
|
35
|
-
<ref name="secretariat"/>
|
36
|
-
</optional>
|
37
|
-
</element>
|
38
|
-
</define>
|
39
|
-
<define name="BibDataExtensionType">
|
40
|
-
<ref name="doctype"/>
|
41
|
-
<ref name="editorialgroup"/>
|
42
|
-
<zeroOrMore>
|
43
|
-
<ref name="ics"/>
|
44
|
-
</zeroOrMore>
|
45
|
-
<ref name="structuredidentifier"/>
|
46
|
-
<optional>
|
47
|
-
<ref name="stagename"/>
|
48
|
-
</optional>
|
49
|
-
</define>
|
50
|
-
<define name="bdate">
|
51
|
-
<element name="date">
|
52
|
-
<attribute name="type">
|
53
|
-
<choice>
|
54
|
-
<ref name="BibliographicDateType"/>
|
55
|
-
<text/>
|
56
|
-
</choice>
|
57
|
-
</attribute>
|
58
|
-
<choice>
|
59
|
-
<group>
|
60
|
-
<element name="from">
|
61
|
-
<ref name="ISO8601Date"/>
|
62
|
-
</element>
|
63
|
-
<optional>
|
64
|
-
<element name="to">
|
65
|
-
<ref name="ISO8601Date"/>
|
66
|
-
</element>
|
67
|
-
</optional>
|
68
|
-
</group>
|
69
|
-
<element name="on">
|
70
|
-
<choice>
|
71
|
-
<ref name="ISO8601Date"/>
|
72
|
-
<value>--</value>
|
73
|
-
<value>–</value>
|
74
|
-
</choice>
|
75
|
-
</element>
|
76
|
-
</choice>
|
77
|
-
</element>
|
78
|
-
</define>
|
79
|
-
<define name="ul">
|
80
|
-
<element name="ul">
|
81
|
-
<attribute name="id">
|
82
|
-
<data type="ID"/>
|
83
|
-
</attribute>
|
84
|
-
<oneOrMore>
|
85
|
-
<ref name="ul_li"/>
|
86
|
-
</oneOrMore>
|
87
|
-
<zeroOrMore>
|
88
|
-
<ref name="note"/>
|
89
|
-
</zeroOrMore>
|
90
|
-
</element>
|
91
|
-
</define>
|
92
|
-
<define name="sections">
|
93
|
-
<element name="sections">
|
94
|
-
<ref name="clause"/>
|
95
|
-
<optional>
|
96
|
-
<choice>
|
97
|
-
<ref name="term-clause"/>
|
98
|
-
<ref name="terms"/>
|
99
|
-
</choice>
|
100
|
-
</optional>
|
101
|
-
<optional>
|
102
|
-
<ref name="definitions"/>
|
103
|
-
</optional>
|
104
|
-
<oneOrMore>
|
105
|
-
<ref name="clause"/>
|
106
|
-
</oneOrMore>
|
107
|
-
</element>
|
108
|
-
</define>
|
109
|
-
<define name="Clause-Section">
|
110
|
-
<optional>
|
111
|
-
<attribute name="id">
|
112
|
-
<data type="ID"/>
|
113
|
-
</attribute>
|
114
|
-
</optional>
|
115
|
-
<optional>
|
116
|
-
<attribute name="language"/>
|
117
|
-
</optional>
|
118
|
-
<optional>
|
119
|
-
<attribute name="script"/>
|
120
|
-
</optional>
|
121
|
-
<optional>
|
122
|
-
<attribute name="inline-header">
|
123
|
-
<data type="boolean"/>
|
124
|
-
</attribute>
|
125
|
-
</optional>
|
126
|
-
<optional>
|
127
|
-
<attribute name="obligation">
|
128
|
-
<choice>
|
129
|
-
<value>normative</value>
|
130
|
-
<value>informative</value>
|
131
|
-
</choice>
|
132
|
-
</attribute>
|
133
|
-
</optional>
|
134
|
-
<optional>
|
135
|
-
<ref name="section-title"/>
|
136
|
-
</optional>
|
137
|
-
<choice>
|
138
|
-
<group>
|
139
|
-
<oneOrMore>
|
140
|
-
<ref name="BasicBlock"/>
|
141
|
-
</oneOrMore>
|
142
|
-
<zeroOrMore>
|
143
|
-
<ref name="note"/>
|
144
|
-
</zeroOrMore>
|
145
|
-
</group>
|
146
|
-
<oneOrMore>
|
147
|
-
<ref name="clause-subsection"/>
|
148
|
-
</oneOrMore>
|
149
|
-
</choice>
|
150
|
-
</define>
|
151
|
-
<define name="term">
|
152
|
-
<element name="term">
|
153
|
-
<optional>
|
154
|
-
<attribute name="id">
|
155
|
-
<data type="ID"/>
|
156
|
-
</attribute>
|
157
|
-
</optional>
|
158
|
-
<ref name="preferred"/>
|
159
|
-
<zeroOrMore>
|
160
|
-
<ref name="admitted"/>
|
161
|
-
</zeroOrMore>
|
162
|
-
<zeroOrMore>
|
163
|
-
<ref name="deprecates"/>
|
164
|
-
</zeroOrMore>
|
165
|
-
<optional>
|
166
|
-
<ref name="termdomain"/>
|
167
|
-
</optional>
|
168
|
-
<ref name="definition"/>
|
169
|
-
<zeroOrMore>
|
170
|
-
<ref name="termnote"/>
|
171
|
-
</zeroOrMore>
|
172
|
-
<zeroOrMore>
|
173
|
-
<ref name="termexample"/>
|
174
|
-
</zeroOrMore>
|
175
|
-
<zeroOrMore>
|
176
|
-
<ref name="termsource"/>
|
177
|
-
</zeroOrMore>
|
178
|
-
</element>
|
179
|
-
</define>
|
180
|
-
<define name="definition">
|
181
|
-
<element name="definition">
|
182
|
-
<oneOrMore>
|
183
|
-
<choice>
|
184
|
-
<ref name="paragraph"/>
|
185
|
-
<ref name="figure"/>
|
186
|
-
<ref name="formula"/>
|
187
|
-
</choice>
|
188
|
-
</oneOrMore>
|
189
|
-
</element>
|
190
|
-
</define>
|
191
|
-
<define name="annex">
|
192
|
-
<element name="annex">
|
193
|
-
<optional>
|
194
|
-
<attribute name="id">
|
195
|
-
<data type="ID"/>
|
196
|
-
</attribute>
|
197
|
-
</optional>
|
198
|
-
<optional>
|
199
|
-
<attribute name="language"/>
|
200
|
-
</optional>
|
201
|
-
<optional>
|
202
|
-
<attribute name="script"/>
|
203
|
-
</optional>
|
204
|
-
<optional>
|
205
|
-
<attribute name="inline-header">
|
206
|
-
<data type="boolean"/>
|
207
|
-
</attribute>
|
208
|
-
</optional>
|
209
|
-
<optional>
|
210
|
-
<attribute name="obligation">
|
211
|
-
<choice>
|
212
|
-
<value>normative</value>
|
213
|
-
<value>informative</value>
|
214
|
-
</choice>
|
215
|
-
</attribute>
|
216
|
-
</optional>
|
217
|
-
<optional>
|
218
|
-
<ref name="section-title"/>
|
219
|
-
</optional>
|
220
|
-
<zeroOrMore>
|
221
|
-
<!--
|
222
|
-
allow hanging paragraps in annexes: they introduce lists
|
223
|
-
( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
|
224
|
-
-->
|
225
|
-
<ref name="BasicBlock"/>
|
226
|
-
</zeroOrMore>
|
227
|
-
<zeroOrMore>
|
228
|
-
<ref name="note"/>
|
229
|
-
</zeroOrMore>
|
230
|
-
<zeroOrMore>
|
231
|
-
<ref name="clause-hanging-paragraph-with-footnote"/>
|
232
|
-
</zeroOrMore>
|
233
|
-
<zeroOrMore>
|
234
|
-
<ref name="annex-appendix"/>
|
235
|
-
</zeroOrMore>
|
236
|
-
</element>
|
237
|
-
</define>
|
238
|
-
<define name="AdmonitionType">
|
239
|
-
<choice>
|
240
|
-
<value>danger</value>
|
241
|
-
<value>caution</value>
|
242
|
-
<value>warning</value>
|
243
|
-
<value>important</value>
|
244
|
-
<value>safety precautions</value>
|
245
|
-
</choice>
|
246
|
-
</define>
|
247
|
-
<define name="preface">
|
248
|
-
<element name="preface">
|
249
|
-
<optional>
|
250
|
-
<ref name="preface_abstract"/>
|
251
|
-
</optional>
|
252
|
-
<ref name="foreword"/>
|
253
|
-
<optional>
|
254
|
-
<ref name="introduction"/>
|
255
|
-
</optional>
|
256
|
-
</element>
|
257
|
-
</define>
|
258
|
-
<define name="DocumentType">
|
259
|
-
<choice>
|
260
|
-
<value>international-standard</value>
|
261
|
-
<value>technical-specification</value>
|
262
|
-
<value>technical-report</value>
|
263
|
-
<value>publicly-available-specification</value>
|
264
|
-
<value>international-workshop-agreement</value>
|
265
|
-
<value>guide</value>
|
266
|
-
</choice>
|
267
|
-
</define>
|
268
|
-
<define name="structuredidentifier">
|
269
|
-
<element name="structuredidentifier">
|
270
|
-
<optional>
|
271
|
-
<attribute name="type"/>
|
272
|
-
</optional>
|
273
|
-
<group>
|
274
|
-
<ref name="documentnumber"/>
|
275
|
-
<optional>
|
276
|
-
<ref name="tc-documentnumber"/>
|
277
|
-
</optional>
|
278
|
-
</group>
|
279
|
-
</element>
|
280
|
-
</define>
|
281
|
-
<define name="foreword">
|
282
|
-
<element name="foreword">
|
283
|
-
<ref name="Basic-Section"/>
|
284
|
-
</element>
|
285
|
-
</define>
|
286
|
-
<define name="introduction">
|
287
|
-
<element name="introduction">
|
288
|
-
<ref name="Content-Section"/>
|
289
|
-
</element>
|
290
|
-
</define>
|
291
|
-
<define name="editorialgroup">
|
292
|
-
<element name="editorialgroup">
|
293
|
-
<oneOrMore>
|
294
|
-
<ref name="technical-committee"/>
|
295
|
-
</oneOrMore>
|
296
|
-
<zeroOrMore>
|
297
|
-
<ref name="subcommittee"/>
|
298
|
-
</zeroOrMore>
|
299
|
-
<zeroOrMore>
|
300
|
-
<ref name="workgroup"/>
|
301
|
-
</zeroOrMore>
|
302
|
-
<optional>
|
303
|
-
<ref name="secretariat"/>
|
304
|
-
</optional>
|
305
|
-
</element>
|
306
|
-
</define>
|
307
|
-
<define name="Content-Section">
|
308
|
-
<optional>
|
309
|
-
<attribute name="id">
|
310
|
-
<data type="ID"/>
|
311
|
-
</attribute>
|
312
|
-
</optional>
|
313
|
-
<optional>
|
314
|
-
<attribute name="language"/>
|
315
|
-
</optional>
|
316
|
-
<optional>
|
317
|
-
<attribute name="script"/>
|
318
|
-
</optional>
|
319
|
-
<optional>
|
320
|
-
<attribute name="obligation">
|
321
|
-
<choice>
|
322
|
-
<value>normative</value>
|
323
|
-
<value>informative</value>
|
324
|
-
</choice>
|
325
|
-
</attribute>
|
326
|
-
</optional>
|
327
|
-
<optional>
|
328
|
-
<ref name="section-title"/>
|
329
|
-
</optional>
|
330
|
-
<choice>
|
331
|
-
<group>
|
332
|
-
<zeroOrMore>
|
333
|
-
<ref name="BasicBlock"/>
|
334
|
-
</zeroOrMore>
|
335
|
-
<zeroOrMore>
|
336
|
-
<ref name="note"/>
|
337
|
-
</zeroOrMore>
|
338
|
-
</group>
|
339
|
-
<oneOrMore>
|
340
|
-
<ref name="content-subsection"/>
|
341
|
-
</oneOrMore>
|
342
|
-
</choice>
|
343
|
-
</define>
|
344
|
-
<define name="table">
|
345
|
-
<element name="table">
|
346
|
-
<attribute name="id">
|
347
|
-
<data type="ID"/>
|
348
|
-
</attribute>
|
349
|
-
<optional>
|
350
|
-
<attribute name="width"/>
|
351
|
-
</optional>
|
352
|
-
<optional>
|
353
|
-
<attribute name="unnumbered">
|
354
|
-
<data type="boolean"/>
|
355
|
-
</attribute>
|
356
|
-
</optional>
|
357
|
-
<optional>
|
358
|
-
<attribute name="subsequence"/>
|
359
|
-
</optional>
|
360
|
-
<optional>
|
361
|
-
<attribute name="alt"/>
|
362
|
-
</optional>
|
363
|
-
<optional>
|
364
|
-
<attribute name="summary"/>
|
365
|
-
</optional>
|
366
|
-
<optional>
|
367
|
-
<attribute name="uri">
|
368
|
-
<data type="anyURI"/>
|
369
|
-
</attribute>
|
370
|
-
</optional>
|
371
|
-
<optional>
|
372
|
-
<ref name="tname"/>
|
373
|
-
</optional>
|
374
|
-
<optional>
|
375
|
-
<ref name="thead"/>
|
376
|
-
</optional>
|
377
|
-
<ref name="tbody"/>
|
378
|
-
<optional>
|
379
|
-
<ref name="tfoot"/>
|
380
|
-
</optional>
|
381
|
-
<zeroOrMore>
|
382
|
-
<ref name="table-note"/>
|
383
|
-
</zeroOrMore>
|
384
|
-
<optional>
|
385
|
-
<ref name="dl"/>
|
386
|
-
</optional>
|
387
|
-
</element>
|
388
|
-
</define>
|
389
|
-
</include>
|
390
|
-
<!-- end overrides -->
|
391
|
-
<!--
|
392
|
-
We display the Normative References between scope and terms; but to keep the
|
393
|
-
grammar simple, we keep the references together
|
394
|
-
-->
|
395
|
-
<define name="iso-standard">
|
396
|
-
<element name="iso-standard">
|
397
|
-
<ref name="bibdata"/>
|
398
|
-
<zeroOrMore>
|
399
|
-
<ref name="termdocsource"/>
|
400
|
-
</zeroOrMore>
|
401
|
-
<optional>
|
402
|
-
<ref name="boilerplate"/>
|
403
|
-
</optional>
|
404
|
-
<ref name="preface"/>
|
405
|
-
<oneOrMore>
|
406
|
-
<ref name="sections"/>
|
407
|
-
</oneOrMore>
|
408
|
-
<zeroOrMore>
|
409
|
-
<ref name="annex"/>
|
410
|
-
</zeroOrMore>
|
411
|
-
<ref name="bibliography"/>
|
412
|
-
</element>
|
413
|
-
</define>
|
414
|
-
<define name="documentnumber">
|
415
|
-
<element name="project-number">
|
416
|
-
<optional>
|
417
|
-
<attribute name="part">
|
418
|
-
<data type="int"/>
|
419
|
-
</attribute>
|
420
|
-
</optional>
|
421
|
-
<optional>
|
422
|
-
<attribute name="subpart">
|
423
|
-
<data type="int"/>
|
424
|
-
</attribute>
|
425
|
-
</optional>
|
426
|
-
<text/>
|
427
|
-
</element>
|
428
|
-
</define>
|
429
|
-
<define name="tc-documentnumber">
|
430
|
-
<element name="tc-document-number">
|
431
|
-
<data type="int"/>
|
432
|
-
</element>
|
433
|
-
</define>
|
434
|
-
<define name="subcommittee">
|
435
|
-
<element name="subcommittee">
|
436
|
-
<ref name="IsoWorkgroup"/>
|
437
|
-
</element>
|
438
|
-
</define>
|
439
|
-
<define name="workgroup">
|
440
|
-
<element name="workgroup">
|
441
|
-
<ref name="IsoWorkgroup"/>
|
442
|
-
</element>
|
443
|
-
</define>
|
444
|
-
<define name="secretariat">
|
445
|
-
<element name="secretariat">
|
446
|
-
<text/>
|
447
|
-
</element>
|
448
|
-
</define>
|
449
|
-
<define name="clause-hanging-paragraph-with-footnote">
|
450
|
-
<element name="clause">
|
451
|
-
<optional>
|
452
|
-
<attribute name="id">
|
453
|
-
<data type="ID"/>
|
454
|
-
</attribute>
|
455
|
-
</optional>
|
456
|
-
<optional>
|
457
|
-
<attribute name="language"/>
|
458
|
-
</optional>
|
459
|
-
<optional>
|
460
|
-
<attribute name="script"/>
|
461
|
-
</optional>
|
462
|
-
<optional>
|
463
|
-
<attribute name="inline-header">
|
464
|
-
<data type="boolean"/>
|
465
|
-
</attribute>
|
466
|
-
</optional>
|
467
|
-
<optional>
|
468
|
-
<attribute name="obligation">
|
469
|
-
<choice>
|
470
|
-
<value>normative</value>
|
471
|
-
<value>informative</value>
|
472
|
-
</choice>
|
473
|
-
</attribute>
|
474
|
-
</optional>
|
475
|
-
<optional>
|
476
|
-
<ref name="section-title"/>
|
477
|
-
</optional>
|
478
|
-
<zeroOrMore>
|
479
|
-
<!-- allow hanging paragraphs in annexes: they introduce lists -->
|
480
|
-
<ref name="BasicBlock"/>
|
481
|
-
</zeroOrMore>
|
482
|
-
<zeroOrMore>
|
483
|
-
<ref name="note"/>
|
484
|
-
</zeroOrMore>
|
485
|
-
<zeroOrMore>
|
486
|
-
<ref name="clause-hanging-paragraph-with-footnote"/>
|
487
|
-
</zeroOrMore>
|
488
|
-
</element>
|
489
|
-
</define>
|
490
|
-
<define name="annex-appendix">
|
491
|
-
<element name="appendix">
|
492
|
-
<ref name="Clause-Section"/>
|
493
|
-
</element>
|
494
|
-
</define>
|
495
|
-
<define name="ul_li">
|
496
|
-
<element name="li">
|
497
|
-
<optional>
|
498
|
-
<attribute name="id">
|
499
|
-
<data type="ID"/>
|
500
|
-
</attribute>
|
501
|
-
</optional>
|
502
|
-
<optional>
|
503
|
-
<attribute name="uncheckedcheckbox">
|
504
|
-
<data type="boolean"/>
|
505
|
-
</attribute>
|
506
|
-
</optional>
|
507
|
-
<optional>
|
508
|
-
<attribute name="checkedcheckbox">
|
509
|
-
<data type="boolean"/>
|
510
|
-
</attribute>
|
511
|
-
</optional>
|
512
|
-
<oneOrMore>
|
513
|
-
<ref name="paragraph-with-footnote"/>
|
514
|
-
</oneOrMore>
|
515
|
-
</element>
|
516
|
-
</define>
|
517
|
-
<define name="stagename">
|
518
|
-
<element name="stagename">
|
519
|
-
<text/>
|
520
|
-
</element>
|
521
|
-
</define>
|
522
|
-
</grammar>
|