relaton-itu 1.1.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -68,6 +68,16 @@
68
68
  <text/>
69
69
  </element>
70
70
  </optional>
71
+ <optional>
72
+ <element name="amendment">
73
+ <data type="int"/>
74
+ </element>
75
+ </optional>
76
+ <optional>
77
+ <element name="corrigendum">
78
+ <data type="int"/>
79
+ </element>
80
+ </optional>
71
81
  </element>
72
82
  </define>
73
83
  <define name="BibDataExtensionType">
@@ -84,6 +94,18 @@
84
94
  <optional>
85
95
  <ref name="ipnoticereceived"/>
86
96
  </optional>
97
+ <optional>
98
+ <ref name="meeting"/>
99
+ </optional>
100
+ <optional>
101
+ <ref name="meeting-date"/>
102
+ </optional>
103
+ <optional>
104
+ <ref name="intended-type"/>
105
+ </optional>
106
+ <optional>
107
+ <ref name="ext_source"/>
108
+ </optional>
87
109
  <optional>
88
110
  <ref name="structuredidentifier"/>
89
111
  </optional>
@@ -103,6 +125,44 @@
103
125
  </element>
104
126
  </define>
105
127
  </include>
128
+ <define name="meeting">
129
+ <element name="meeting">
130
+ <text/>
131
+ </element>
132
+ </define>
133
+ <define name="meeting-date">
134
+ <element name="meeting-date">
135
+ <choice>
136
+ <group>
137
+ <element name="from">
138
+ <ref name="ISO8601Date"/>
139
+ </element>
140
+ <optional>
141
+ <element name="to">
142
+ <ref name="ISO8601Date"/>
143
+ </element>
144
+ </optional>
145
+ </group>
146
+ <element name="on">
147
+ <ref name="ISO8601Date"/>
148
+ </element>
149
+ </choice>
150
+ </element>
151
+ </define>
152
+ <define name="intended-type">
153
+ <element name="intended-type">
154
+ <choice>
155
+ <value>R</value>
156
+ <value>C</value>
157
+ <value>TD</value>
158
+ </choice>
159
+ </element>
160
+ </define>
161
+ <define name="ext_source">
162
+ <element name="source">
163
+ <text/>
164
+ </element>
165
+ </define>
106
166
  <define name="TextElement" combine="choice">
107
167
  <choice>
108
168
  <ref name="add"/>
@@ -244,6 +304,13 @@
244
304
  </define>
245
305
  <define name="itu">
246
306
  <element name="itu-standard">
307
+ <attribute name="version"/>
308
+ <attribute name="type">
309
+ <choice>
310
+ <value>semantic</value>
311
+ <value>presentation</value>
312
+ </choice>
313
+ </attribute>
247
314
  <ref name="bibdata"/>
248
315
  <zeroOrMore>
249
316
  <ref name="termdocsource"/>
@@ -25,8 +25,13 @@ module RelatonItu
25
25
  @workgroup = workgroup.is_a?(Hash) ? ItuGroup.new(workgroup) : workgroup
26
26
  end
27
27
 
28
+ # @return [true]
29
+ def presence?
30
+ true
31
+ end
32
+
28
33
  # @param builder [Nokogiri::XML::Builder]
29
- def to_xml(builder)
34
+ def to_xml(builder) # rubocop:disable Metrics/AbcSize
30
35
  builder.editorialgroup do
31
36
  builder.bureau bureau
32
37
  builder.group { |b| group.to_xml b } if group
@@ -43,5 +48,17 @@ module RelatonItu
43
48
  hash["workgroup"] = workgroup.to_hash if workgroup
44
49
  hash
45
50
  end
51
+
52
+ # @param prefix [String]
53
+ # @return [String]
54
+ def to_asciibib(prefix) # rubocop:disable Metrics/AbcSize
55
+ pref = prefix.empty? ? prefix : prefix + "."
56
+ pref += "editorialgroup"
57
+ out = "#{pref}.bureau:: #{bureau}\n"
58
+ out += group.to_asciibib "#{pref}.group" if group
59
+ out += subgroup.to_asciibib "#{pref}.subgroup" if subgroup
60
+ out += workgroup.to_asciibib "#{pref}.workgroup" if workgroup
61
+ out
62
+ end
46
63
  end
47
64
  end
@@ -1,5 +1,5 @@
1
1
  module RelatonItu
2
- class HashConverter < RelatonIsoBib::HashConverter
2
+ class HashConverter < RelatonBib::HashConverter
3
3
  class << self
4
4
  private
5
5
 
@@ -15,7 +15,7 @@ module RelatonItu
15
15
  return unless ret[:structuredidentifier]
16
16
 
17
17
  ret[:structuredidentifier] = StructuredIdentifier.new(
18
- ret[:structuredidentifier],
18
+ ret[:structuredidentifier]
19
19
  )
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  module RelatonItu
2
- class ItuBibliographicItem < RelatonIsoBib::IsoBibliographicItem
2
+ class ItuBibliographicItem < RelatonBib::BibliographicItem
3
3
  TYPES = %w[
4
4
  recommendation recommendation-supplement recommendation-amendment
5
5
  recommendation-corrigendum recommendation-errata recommendation-annex
@@ -9,9 +9,8 @@ module RelatonItu
9
9
 
10
10
  # @params structuredidentifier [RelatonItu::StructuredIdentifier]
11
11
  def initialize(**args)
12
- @doctype = args.delete :doctype
13
- if doctype && !TYPES.include?(doctype)
14
- warn "[relaton-itu] WARNING: invalid doctype: #{doctype}"
12
+ if args[:doctype] && !TYPES.include?(args[:doctype])
13
+ warn "[relaton-itu] WARNING: invalid doctype: #{args[:doctype]}"
15
14
  end
16
15
  super
17
16
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "relaton_iso_bib"
3
+ require "relaton_bib"
4
4
  require "relaton_itu/itu_bibliographic_item"
5
5
  require "relaton_itu/editorial_group"
6
6
  require "relaton_itu/structured_identifier"
@@ -67,14 +67,6 @@ module RelatonItu
67
67
  nil
68
68
  end
69
69
 
70
- # def fetch_pages(hits, threads)
71
- # workers = RelatonBib::WorkersPool.new threads
72
- # workers.worker { |w| { i: w[:i], hit: w[:hit].fetch } }
73
- # hits.each_with_index { |hit, i| workers << { i: i, hit: hit } }
74
- # workers.end
75
- # workers.result.sort_by { |a| a[:i] }.map { |x| x[:hit] }
76
- # end
77
-
78
70
  def search_filter(code)
79
71
  docidrx = %r{\w+\.\d+|\w\sSuppl\.\s\d+} # %r{^ITU-T\s[^\s]+}
80
72
  c = code.sub(/Imp\s?/, "").match(docidrx).to_s
@@ -28,6 +28,16 @@ module RelatonItu
28
28
  hash["finish"] = finish if finish
29
29
  hash
30
30
  end
31
+
32
+ # @param prefix [String]
33
+ # @return [String]
34
+ def to_asciibib(prefix)
35
+ pref = prefix.empty? ? prefix : prefix + "."
36
+ pref += "period"
37
+ out = "#{pref}.start:: #{start}\n"
38
+ out += "#{pref}.finish:: #{finish}\n" if finish
39
+ out
40
+ end
31
41
  end
32
42
 
33
43
  TYPES = %w[tsag study-group work-group].freeze
@@ -72,5 +82,16 @@ module RelatonItu
72
82
  hash["period"] = period.to_hash if period
73
83
  hash
74
84
  end
85
+
86
+ # @param prefix [String]
87
+ # @return [String]
88
+ def to_asciibib(prefix)
89
+ pref = prefix.empty? ? prefix : prefix + "."
90
+ out = "#{pref}name:: #{name}\n"
91
+ out += "#{pref}type:: #{type}\n" if type
92
+ out += "#{pref}acronym:: #{acronym}\n" if acronym
93
+ out += period.to_asciibib prefix if period
94
+ out
95
+ end
75
96
  end
76
97
  end
@@ -43,6 +43,7 @@ module RelatonItu
43
43
 
44
44
  ItuBibliographicItem.new(
45
45
  fetched: Date.today.to_s,
46
+ type: "standard",
46
47
  docid: fetch_docid(doc),
47
48
  edition: edition,
48
49
  language: ["en"],
@@ -170,7 +171,7 @@ module RelatonItu
170
171
  doc.xpath('//div[contains(@id, "tab_sup")]//table/tr[position()>2]').map do |r|
171
172
  ref = r.at('./td/span[contains(@id, "title_e")]/nobr/a')
172
173
  fref = RelatonBib::FormattedRef.new(content: ref.text, language: "en", script: "Latn")
173
- bibitem = RelatonIsoBib::IsoBibliographicItem.new(formattedref: fref)
174
+ bibitem = ItuBibliographicItem.new(formattedref: fref, type: "standard")
174
175
  { type: "complements", bibitem: bibitem }
175
176
  end
176
177
  end
@@ -183,30 +184,7 @@ module RelatonItu
183
184
  t = doc.at("//td[@class='title']|//div/table[1]/tr[4]/td/strong")
184
185
  return [] unless t
185
186
 
186
- titles = t.text.sub(/\w\.Imp\s?\d+\u00A0:\u00A0/, "").split " - "
187
- case titles.size
188
- when 0
189
- intro, main, part = nil, "", nil
190
- when 1
191
- intro, main, part = nil, titles[0], nil
192
- when 2
193
- if /^(Part|Partie) \d+:/ =~ titles[1]
194
- intro, main, part = nil, titles[0], titles[1]
195
- else
196
- intro, main, part = titles[0], titles[1], nil
197
- end
198
- when 3
199
- intro, main, part = titles[0], titles[1], titles[2]
200
- else
201
- intro, main, part = titles[0], titles[1], titles[2..-1]&.join(" -- ")
202
- end
203
- [{
204
- title_intro: intro,
205
- title_main: main,
206
- title_part: part,
207
- language: "en",
208
- script: "Latn",
209
- }]
187
+ RelatonBib::TypedTitleString.from_string t.text, "en", "Latn"
210
188
  end
211
189
 
212
190
  # Fetch dates
@@ -33,5 +33,19 @@ module RelatonItu
33
33
  hash[:annexid] = annexid if annexid
34
34
  hash
35
35
  end
36
+
37
+ # @param prefix [String]
38
+ # @return [String]
39
+ def to_asciibib(prefix)
40
+ pref = prefix.empty? ? prefix : prefix + "."
41
+ pref += "structuredidentifier"
42
+ out = "#{pref}.bureau:: #{bureau}\n#{pref}.docnumber:: #{docnumber}\n"
43
+ out += "#{pref}.annexid:: #{annexid}\n" if annexid
44
+ out
45
+ end
46
+
47
+ def presence?
48
+ true
49
+ end
36
50
  end
37
51
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.5.0".freeze
3
3
  end
@@ -1,7 +1,7 @@
1
1
  require "nokogiri"
2
2
 
3
3
  module RelatonItu
4
- class XMLParser < RelatonIsoBib::XMLParser
4
+ class XMLParser < RelatonBib::XMLParser
5
5
  class << self
6
6
  private
7
7
 
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  # Specify which files should be added to the gem when it is released.
20
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
21
- spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
23
  end
24
24
  spec.bindir = "exe"
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
37
37
  spec.add_development_dependency "vcr", "~> 5.0.0"
38
38
  spec.add_development_dependency "webmock"
39
39
 
40
- spec.add_dependency "relaton-iso-bib", "~> 1.1.0"
40
+ spec.add_dependency "relaton-bib", "~> 1.5.0"
41
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-03 00:00:00.000000000 Z
11
+ date: 2020-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -151,19 +151,19 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  - !ruby/object:Gem::Dependency
154
- name: relaton-iso-bib
154
+ name: relaton-bib
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 1.1.0
159
+ version: 1.5.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.1.0
166
+ version: 1.5.0
167
167
  description: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
168
168
  model'
169
169
  email:
@@ -187,7 +187,6 @@ files:
187
187
  - grammars/basicdoc.rng
188
188
  - grammars/biblio.rng
189
189
  - grammars/isodoc.rng
190
- - grammars/isostandard.rng
191
190
  - grammars/itu.rng
192
191
  - grammars/reqt.rng
193
192
  - lib/relaton_itu.rb
@@ -208,7 +207,7 @@ homepage: https://github.com/metanorma/relaton-itu
208
207
  licenses:
209
208
  - MIT
210
209
  metadata: {}
211
- post_install_message:
210
+ post_install_message:
212
211
  rdoc_options: []
213
212
  require_paths:
214
213
  - lib
@@ -224,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
223
  version: '0'
225
224
  requirements: []
226
225
  rubygems_version: 3.0.6
227
- signing_key:
226
+ signing_key:
228
227
  specification_version: 4
229
228
  summary: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem
230
229
  model'
@@ -1,530 +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
- <zeroOrMore>
95
- <choice>
96
- <ref name="note"/>
97
- <ref name="admonition"/>
98
- </choice>
99
- </zeroOrMore>
100
- <ref name="clause"/>
101
- <optional>
102
- <choice>
103
- <ref name="term-clause"/>
104
- <ref name="terms"/>
105
- </choice>
106
- </optional>
107
- <optional>
108
- <ref name="definitions"/>
109
- </optional>
110
- <oneOrMore>
111
- <ref name="clause"/>
112
- </oneOrMore>
113
- </element>
114
- </define>
115
- <define name="Clause-Section">
116
- <optional>
117
- <attribute name="id">
118
- <data type="ID"/>
119
- </attribute>
120
- </optional>
121
- <optional>
122
- <attribute name="language"/>
123
- </optional>
124
- <optional>
125
- <attribute name="script"/>
126
- </optional>
127
- <optional>
128
- <attribute name="inline-header">
129
- <data type="boolean"/>
130
- </attribute>
131
- </optional>
132
- <optional>
133
- <attribute name="obligation">
134
- <choice>
135
- <value>normative</value>
136
- <value>informative</value>
137
- </choice>
138
- </attribute>
139
- </optional>
140
- <optional>
141
- <ref name="section-title"/>
142
- </optional>
143
- <choice>
144
- <group>
145
- <oneOrMore>
146
- <ref name="BasicBlock"/>
147
- </oneOrMore>
148
- <zeroOrMore>
149
- <ref name="note"/>
150
- </zeroOrMore>
151
- </group>
152
- <oneOrMore>
153
- <ref name="clause-subsection"/>
154
- </oneOrMore>
155
- </choice>
156
- </define>
157
- <define name="term">
158
- <element name="term">
159
- <optional>
160
- <attribute name="id">
161
- <data type="ID"/>
162
- </attribute>
163
- </optional>
164
- <ref name="preferred"/>
165
- <zeroOrMore>
166
- <ref name="admitted"/>
167
- </zeroOrMore>
168
- <zeroOrMore>
169
- <ref name="deprecates"/>
170
- </zeroOrMore>
171
- <optional>
172
- <ref name="termdomain"/>
173
- </optional>
174
- <ref name="definition"/>
175
- <zeroOrMore>
176
- <ref name="termnote"/>
177
- </zeroOrMore>
178
- <zeroOrMore>
179
- <ref name="termexample"/>
180
- </zeroOrMore>
181
- <zeroOrMore>
182
- <ref name="termsource"/>
183
- </zeroOrMore>
184
- </element>
185
- </define>
186
- <define name="definition">
187
- <element name="definition">
188
- <oneOrMore>
189
- <choice>
190
- <ref name="paragraph"/>
191
- <ref name="figure"/>
192
- <ref name="formula"/>
193
- </choice>
194
- </oneOrMore>
195
- </element>
196
- </define>
197
- <define name="annex">
198
- <element name="annex">
199
- <optional>
200
- <attribute name="id">
201
- <data type="ID"/>
202
- </attribute>
203
- </optional>
204
- <optional>
205
- <attribute name="language"/>
206
- </optional>
207
- <optional>
208
- <attribute name="script"/>
209
- </optional>
210
- <optional>
211
- <attribute name="inline-header">
212
- <data type="boolean"/>
213
- </attribute>
214
- </optional>
215
- <optional>
216
- <attribute name="obligation">
217
- <choice>
218
- <value>normative</value>
219
- <value>informative</value>
220
- </choice>
221
- </attribute>
222
- </optional>
223
- <optional>
224
- <ref name="section-title"/>
225
- </optional>
226
- <zeroOrMore>
227
- <!--
228
- allow hanging paragraps in annexes: they introduce lists
229
- ( paragraph-with-footnote | table | note | formula | admonition | ol | ul | dl | figure | quote | sourcecode | review | example )*,
230
- -->
231
- <ref name="BasicBlock"/>
232
- </zeroOrMore>
233
- <zeroOrMore>
234
- <ref name="note"/>
235
- </zeroOrMore>
236
- <zeroOrMore>
237
- <ref name="clause-hanging-paragraph-with-footnote"/>
238
- </zeroOrMore>
239
- <zeroOrMore>
240
- <ref name="annex-appendix"/>
241
- </zeroOrMore>
242
- </element>
243
- </define>
244
- <define name="AdmonitionType">
245
- <choice>
246
- <value>danger</value>
247
- <value>caution</value>
248
- <value>warning</value>
249
- <value>important</value>
250
- <value>safety precautions</value>
251
- </choice>
252
- </define>
253
- <define name="preface">
254
- <element name="preface">
255
- <optional>
256
- <ref name="preface_abstract"/>
257
- </optional>
258
- <ref name="foreword"/>
259
- <optional>
260
- <ref name="introduction"/>
261
- </optional>
262
- </element>
263
- </define>
264
- <define name="DocumentType">
265
- <choice>
266
- <value>international-standard</value>
267
- <value>technical-specification</value>
268
- <value>technical-report</value>
269
- <value>publicly-available-specification</value>
270
- <value>international-workshop-agreement</value>
271
- <value>guide</value>
272
- <value>amendment</value>
273
- <value>technical-corrigendum</value>
274
- </choice>
275
- </define>
276
- <define name="structuredidentifier">
277
- <element name="structuredidentifier">
278
- <optional>
279
- <attribute name="type"/>
280
- </optional>
281
- <group>
282
- <ref name="documentnumber"/>
283
- <optional>
284
- <ref name="tc-documentnumber"/>
285
- </optional>
286
- </group>
287
- </element>
288
- </define>
289
- <define name="foreword">
290
- <element name="foreword">
291
- <ref name="Basic-Section"/>
292
- </element>
293
- </define>
294
- <define name="introduction">
295
- <element name="introduction">
296
- <ref name="Content-Section"/>
297
- </element>
298
- </define>
299
- <define name="editorialgroup">
300
- <element name="editorialgroup">
301
- <oneOrMore>
302
- <ref name="technical-committee"/>
303
- </oneOrMore>
304
- <zeroOrMore>
305
- <ref name="subcommittee"/>
306
- </zeroOrMore>
307
- <zeroOrMore>
308
- <ref name="workgroup"/>
309
- </zeroOrMore>
310
- <optional>
311
- <ref name="secretariat"/>
312
- </optional>
313
- </element>
314
- </define>
315
- <define name="Content-Section">
316
- <optional>
317
- <attribute name="id">
318
- <data type="ID"/>
319
- </attribute>
320
- </optional>
321
- <optional>
322
- <attribute name="language"/>
323
- </optional>
324
- <optional>
325
- <attribute name="script"/>
326
- </optional>
327
- <optional>
328
- <attribute name="obligation">
329
- <choice>
330
- <value>normative</value>
331
- <value>informative</value>
332
- </choice>
333
- </attribute>
334
- </optional>
335
- <optional>
336
- <ref name="section-title"/>
337
- </optional>
338
- <choice>
339
- <group>
340
- <zeroOrMore>
341
- <ref name="BasicBlock"/>
342
- </zeroOrMore>
343
- <zeroOrMore>
344
- <ref name="note"/>
345
- </zeroOrMore>
346
- </group>
347
- <oneOrMore>
348
- <ref name="content-subsection"/>
349
- </oneOrMore>
350
- </choice>
351
- </define>
352
- <define name="table">
353
- <element name="table">
354
- <attribute name="id">
355
- <data type="ID"/>
356
- </attribute>
357
- <optional>
358
- <attribute name="width"/>
359
- </optional>
360
- <optional>
361
- <attribute name="unnumbered">
362
- <data type="boolean"/>
363
- </attribute>
364
- </optional>
365
- <optional>
366
- <attribute name="subsequence"/>
367
- </optional>
368
- <optional>
369
- <attribute name="alt"/>
370
- </optional>
371
- <optional>
372
- <attribute name="summary"/>
373
- </optional>
374
- <optional>
375
- <attribute name="uri">
376
- <data type="anyURI"/>
377
- </attribute>
378
- </optional>
379
- <optional>
380
- <ref name="tname"/>
381
- </optional>
382
- <optional>
383
- <ref name="thead"/>
384
- </optional>
385
- <ref name="tbody"/>
386
- <optional>
387
- <ref name="tfoot"/>
388
- </optional>
389
- <zeroOrMore>
390
- <ref name="table-note"/>
391
- </zeroOrMore>
392
- <optional>
393
- <ref name="dl"/>
394
- </optional>
395
- </element>
396
- </define>
397
- </include>
398
- <!-- end overrides -->
399
- <!--
400
- We display the Normative References between scope and terms; but to keep the
401
- grammar simple, we keep the references together
402
- -->
403
- <define name="iso-standard">
404
- <element name="iso-standard">
405
- <ref name="bibdata"/>
406
- <zeroOrMore>
407
- <ref name="termdocsource"/>
408
- </zeroOrMore>
409
- <optional>
410
- <ref name="boilerplate"/>
411
- </optional>
412
- <ref name="preface"/>
413
- <oneOrMore>
414
- <ref name="sections"/>
415
- </oneOrMore>
416
- <zeroOrMore>
417
- <ref name="annex"/>
418
- </zeroOrMore>
419
- <ref name="bibliography"/>
420
- </element>
421
- </define>
422
- <define name="documentnumber">
423
- <element name="project-number">
424
- <optional>
425
- <attribute name="part">
426
- <data type="int"/>
427
- </attribute>
428
- </optional>
429
- <optional>
430
- <attribute name="subpart">
431
- <data type="int"/>
432
- </attribute>
433
- </optional>
434
- <text/>
435
- </element>
436
- </define>
437
- <define name="tc-documentnumber">
438
- <element name="tc-document-number">
439
- <data type="int"/>
440
- </element>
441
- </define>
442
- <define name="subcommittee">
443
- <element name="subcommittee">
444
- <ref name="IsoWorkgroup"/>
445
- </element>
446
- </define>
447
- <define name="workgroup">
448
- <element name="workgroup">
449
- <ref name="IsoWorkgroup"/>
450
- </element>
451
- </define>
452
- <define name="secretariat">
453
- <element name="secretariat">
454
- <text/>
455
- </element>
456
- </define>
457
- <define name="clause-hanging-paragraph-with-footnote">
458
- <element name="clause">
459
- <optional>
460
- <attribute name="id">
461
- <data type="ID"/>
462
- </attribute>
463
- </optional>
464
- <optional>
465
- <attribute name="language"/>
466
- </optional>
467
- <optional>
468
- <attribute name="script"/>
469
- </optional>
470
- <optional>
471
- <attribute name="inline-header">
472
- <data type="boolean"/>
473
- </attribute>
474
- </optional>
475
- <optional>
476
- <attribute name="obligation">
477
- <choice>
478
- <value>normative</value>
479
- <value>informative</value>
480
- </choice>
481
- </attribute>
482
- </optional>
483
- <optional>
484
- <ref name="section-title"/>
485
- </optional>
486
- <zeroOrMore>
487
- <!-- allow hanging paragraphs in annexes: they introduce lists -->
488
- <ref name="BasicBlock"/>
489
- </zeroOrMore>
490
- <zeroOrMore>
491
- <ref name="note"/>
492
- </zeroOrMore>
493
- <zeroOrMore>
494
- <ref name="clause-hanging-paragraph-with-footnote"/>
495
- </zeroOrMore>
496
- </element>
497
- </define>
498
- <define name="annex-appendix">
499
- <element name="appendix">
500
- <ref name="Clause-Section"/>
501
- </element>
502
- </define>
503
- <define name="ul_li">
504
- <element name="li">
505
- <optional>
506
- <attribute name="id">
507
- <data type="ID"/>
508
- </attribute>
509
- </optional>
510
- <optional>
511
- <attribute name="uncheckedcheckbox">
512
- <data type="boolean"/>
513
- </attribute>
514
- </optional>
515
- <optional>
516
- <attribute name="checkedcheckbox">
517
- <data type="boolean"/>
518
- </attribute>
519
- </optional>
520
- <oneOrMore>
521
- <ref name="BasicBlock"/>
522
- </oneOrMore>
523
- </element>
524
- </define>
525
- <define name="stagename">
526
- <element name="stagename">
527
- <text/>
528
- </element>
529
- </define>
530
- </grammar>