metanorma-ietf 3.3.5 → 3.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -95,7 +95,7 @@
95
95
  <text/>
96
96
  </element>
97
97
  </define>
98
- <define name="LocalizedString1">
98
+ <define name="LocalizedStringAttrs">
99
99
  <optional>
100
100
  <!-- multiple languages and scripts possible: comma delimit them if so -->
101
101
  <attribute name="language"/>
@@ -106,6 +106,10 @@
106
106
  <optional>
107
107
  <attribute name="script"/>
108
108
  </optional>
109
+ </define>
110
+ <define name="LocalizedString1">
111
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
112
+ <ref name="LocalizedStringAttrs"/>
109
113
  <text/>
110
114
  </define>
111
115
  <define name="LocalizedString">
@@ -118,6 +122,23 @@
118
122
  </oneOrMore>
119
123
  </choice>
120
124
  </define>
125
+ <define name="LocalizedMarkedUpString1">
126
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
127
+ <ref name="LocalizedStringAttrs"/>
128
+ <oneOrMore>
129
+ <ref name="TextElement"/>
130
+ </oneOrMore>
131
+ </define>
132
+ <define name="LocalizedMarkedUpString">
133
+ <choice>
134
+ <ref name="LocalizedMarkedUpString1"/>
135
+ <oneOrMore>
136
+ <element name="variant">
137
+ <ref name="LocalizedMarkedUpString1"/>
138
+ </element>
139
+ </oneOrMore>
140
+ </choice>
141
+ </define>
121
142
  <!--
122
143
  Unlike UML, change type to format: type is overloaded
123
144
  Would be need if plain were default value and could omit the attribute
@@ -142,16 +163,8 @@
142
163
  <ref name="LocalizedStringOrXsAny"/>
143
164
  </define>
144
165
  <define name="LocalizedStringOrXsAny1">
145
- <optional>
146
- <!-- multiple languages and scripts possible: comma delimit them if so -->
147
- <attribute name="language"/>
148
- </optional>
149
- <optional>
150
- <attribute name="locale"/>
151
- </optional>
152
- <optional>
153
- <attribute name="script"/>
154
- </optional>
166
+ <!-- multiple languages and scripts possible: comma delimit them if so -->
167
+ <ref name="LocalizedStringAttrs"/>
155
168
  <oneOrMore>
156
169
  <choice>
157
170
  <text/>
@@ -208,9 +221,7 @@
208
221
  </define>
209
222
  <define name="roledescription">
210
223
  <element name="description">
211
- <oneOrMore>
212
- <ref name="TextElement"/>
213
- </oneOrMore>
224
+ <ref name="LocalizedMarkedUpString"/>
214
225
  </element>
215
226
  </define>
216
227
  <define name="person">
@@ -335,9 +346,7 @@
335
346
  </define>
336
347
  <define name="affiliationdescription">
337
348
  <element name="description">
338
- <oneOrMore>
339
- <ref name="TextElement"/>
340
- </oneOrMore>
349
+ <ref name="LocalizedMarkedUpString"/>
341
350
  </element>
342
351
  </define>
343
352
  <define name="organization">
@@ -386,7 +395,7 @@
386
395
  </define>
387
396
  <define name="logo">
388
397
  <element name="logo">
389
- <ref name="image"/>
398
+ <ref name="image-no-id"/>
390
399
  </element>
391
400
  </define>
392
401
  <define name="depiction">
@@ -395,7 +404,7 @@
395
404
  <attribute name="scope"/>
396
405
  </optional>
397
406
  <zeroOrMore>
398
- <ref name="image"/>
407
+ <ref name="image-no-id"/>
399
408
  </zeroOrMore>
400
409
  </element>
401
410
  </define>
@@ -948,9 +957,7 @@
948
957
  <optional>
949
958
  <attribute name="type"/>
950
959
  </optional>
951
- <zeroOrMore>
952
- <ref name="TextElement"/>
953
- </zeroOrMore>
960
+ <ref name="LocalizedMarkedUpString"/>
954
961
  </define>
955
962
  <!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
956
963
  <define name="TypedUri">
@@ -1041,18 +1048,7 @@
1041
1048
  <data type="boolean"/>
1042
1049
  </attribute>
1043
1050
  </optional>
1044
- <optional>
1045
- <attribute name="language"/>
1046
- </optional>
1047
- <optional>
1048
- <attribute name="locale"/>
1049
- </optional>
1050
- <optional>
1051
- <attribute name="script"/>
1052
- </optional>
1053
- <oneOrMore>
1054
- <ref name="TextElement"/>
1055
- </oneOrMore>
1051
+ <ref name="LocalizedMarkedUpString"/>
1056
1052
  </element>
1057
1053
  </define>
1058
1054
  <define name="docnumber">
@@ -1277,16 +1273,20 @@
1277
1273
  <optional>
1278
1274
  <attribute name="type"/>
1279
1275
  </optional>
1280
- <oneOrMore>
1281
- <ref name="TextElement"/>
1282
- </oneOrMore>
1276
+ <ref name="LocalizedMarkedUpString"/>
1283
1277
  </element>
1284
1278
  </define>
1285
1279
  <define name="bibabstract">
1286
1280
  <element name="abstract">
1287
- <oneOrMore>
1288
- <ref name="TextElement"/>
1289
- </oneOrMore>
1281
+ <ref name="LocalizedStringAttrs"/>
1282
+ <choice>
1283
+ <oneOrMore>
1284
+ <ref name="BasicBlockNoId"/>
1285
+ </oneOrMore>
1286
+ <oneOrMore>
1287
+ <ref name="TextElement"/>
1288
+ </oneOrMore>
1289
+ </choice>
1290
1290
  </element>
1291
1291
  </define>
1292
1292
  <define name="copyright">
@@ -1391,9 +1391,7 @@
1391
1391
  </attribute>
1392
1392
  <optional>
1393
1393
  <element name="description">
1394
- <oneOrMore>
1395
- <ref name="TextElement"/>
1396
- </oneOrMore>
1394
+ <ref name="LocalizedMarkedUpString"/>
1397
1395
  </element>
1398
1396
  </optional>
1399
1397
  <element name="bibitem">
@@ -37,10 +37,9 @@ module Metanorma
37
37
  rfc_converter(node).convert("#{@filename}.xml")
38
38
  end
39
39
 
40
- def doctype(node)
41
- ret = node.attr("doctype")&.gsub(/\s+/, "-")&.downcase || "internet-draft"
42
- ret = "internet-draft" if ret == "article"
43
- ret
40
+ def init_misc(node)
41
+ super
42
+ @default_doctype = "internet-draft"
44
43
  end
45
44
 
46
45
  def inline_quoted(node)
@@ -11,10 +11,7 @@
11
11
  <start>
12
12
  <ref name="ietf-standard"/>
13
13
  </start>
14
- <define name="ParagraphType">
15
- <attribute name="id">
16
- <data type="ID"/>
17
- </attribute>
14
+ <define name="ParagraphAttrs">
18
15
  <optional>
19
16
  <attribute name="align">
20
17
  <ref name="Alignments"/>
@@ -33,123 +30,84 @@
33
30
  <optional>
34
31
  <attribute name="indent"/>
35
32
  </optional>
36
- <zeroOrMore>
37
- <ref name="TextElement"/>
38
- </zeroOrMore>
33
+ </define>
34
+ <define name="UlAttr">
35
+ <optional>
36
+ <attribute name="nobullet">
37
+ <data type="boolean"/>
38
+ </attribute>
39
+ </optional>
40
+ <optional>
41
+ <attribute name="spacing"/>
42
+ </optional>
43
+ <optional>
44
+ <attribute name="indent"/>
45
+ </optional>
46
+ <optional>
47
+ <attribute name="bare">
48
+ <data type="boolean"/>
49
+ </attribute>
50
+ </optional>
51
+ </define>
52
+ <define name="UlBody">
53
+ <oneOrMore>
54
+ <ref name="li"/>
55
+ </oneOrMore>
39
56
  <zeroOrMore>
40
57
  <ref name="note"/>
41
58
  </zeroOrMore>
42
59
  </define>
43
- <define name="paragraph-with-footnote">
44
- <element name="p">
45
- <attribute name="id">
46
- <data type="ID"/>
47
- </attribute>
48
- <optional>
49
- <attribute name="align">
50
- <ref name="Alignments"/>
51
- </attribute>
52
- </optional>
53
- <optional>
54
- <attribute name="indent"/>
55
- </optional>
56
- <zeroOrMore>
57
- <choice>
58
- <ref name="TextElement"/>
59
- <ref name="fn"/>
60
- </choice>
61
- </zeroOrMore>
62
- <zeroOrMore>
63
- <ref name="note"/>
64
- </zeroOrMore>
65
- </element>
60
+ <define name="OlAttr">
61
+ <attribute name="type">
62
+ <choice>
63
+ <value>roman</value>
64
+ <value>alphabet</value>
65
+ <value>arabic</value>
66
+ <value>roman_upper</value>
67
+ <value>alphabet_upper</value>
68
+ <value>text</value>
69
+ </choice>
70
+ </attribute>
71
+ <optional>
72
+ <attribute name="group"/>
73
+ </optional>
74
+ <optional>
75
+ <attribute name="spacing"/>
76
+ </optional>
77
+ <optional>
78
+ <attribute name="start"/>
79
+ </optional>
80
+ <optional>
81
+ <attribute name="indent"/>
82
+ </optional>
66
83
  </define>
67
- <define name="ul">
68
- <element name="ul">
69
- <attribute name="id">
70
- <data type="ID"/>
71
- </attribute>
72
- <optional>
73
- <attribute name="nobullet">
74
- <data type="boolean"/>
75
- </attribute>
76
- </optional>
77
- <optional>
78
- <attribute name="spacing"/>
79
- </optional>
80
- <optional>
81
- <attribute name="indent"/>
82
- </optional>
83
- <optional>
84
- <attribute name="bare">
85
- <data type="boolean"/>
86
- </attribute>
87
- </optional>
88
- <oneOrMore>
89
- <ref name="li"/>
90
- </oneOrMore>
91
- <zeroOrMore>
92
- <ref name="note"/>
93
- </zeroOrMore>
94
- </element>
84
+ <define name="OlBody">
85
+ <oneOrMore>
86
+ <ref name="li"/>
87
+ </oneOrMore>
88
+ <zeroOrMore>
89
+ <ref name="note"/>
90
+ </zeroOrMore>
95
91
  </define>
96
- <define name="ol">
97
- <element name="ol">
98
- <attribute name="id">
99
- <data type="ID"/>
100
- </attribute>
101
- <attribute name="type">
102
- <choice>
103
- <value>roman</value>
104
- <value>alphabet</value>
105
- <value>arabic</value>
106
- <value>roman_upper</value>
107
- <value>alphabet_upper</value>
108
- <value>text</value>
109
- </choice>
110
- </attribute>
111
- <optional>
112
- <attribute name="group"/>
113
- </optional>
114
- <optional>
115
- <attribute name="spacing"/>
116
- </optional>
117
- <optional>
118
- <attribute name="start"/>
119
- </optional>
120
- <optional>
121
- <attribute name="indent"/>
122
- </optional>
123
- <oneOrMore>
124
- <ref name="li"/>
125
- </oneOrMore>
126
- <zeroOrMore>
127
- <ref name="note"/>
128
- </zeroOrMore>
129
- </element>
92
+ <define name="DlAttr">
93
+ <optional>
94
+ <attribute name="newline"/>
95
+ </optional>
96
+ <optional>
97
+ <attribute name="indent"/>
98
+ </optional>
99
+ <optional>
100
+ <attribute name="spacing"/>
101
+ </optional>
130
102
  </define>
131
- <define name="dl">
132
- <element name="dl">
133
- <attribute name="id">
134
- <data type="ID"/>
135
- </attribute>
136
- <optional>
137
- <attribute name="newline"/>
138
- </optional>
139
- <optional>
140
- <attribute name="indent"/>
141
- </optional>
142
- <optional>
143
- <attribute name="spacing"/>
144
- </optional>
145
- <oneOrMore>
146
- <ref name="dt"/>
147
- <ref name="dd"/>
148
- </oneOrMore>
149
- <zeroOrMore>
150
- <ref name="note"/>
151
- </zeroOrMore>
152
- </element>
103
+ <define name="DlBody">
104
+ <oneOrMore>
105
+ <ref name="dt"/>
106
+ <ref name="dd"/>
107
+ </oneOrMore>
108
+ <zeroOrMore>
109
+ <ref name="note"/>
110
+ </zeroOrMore>
153
111
  </define>
154
112
  <define name="review">
155
113
  <element name="review">
@@ -178,124 +136,39 @@
178
136
  </oneOrMore>
179
137
  </element>
180
138
  </define>
181
- <define name="note">
182
- <element name="note">
183
- <attribute name="id">
184
- <data type="ID"/>
185
- </attribute>
186
- <optional>
187
- <attribute name="removeInRFC"/>
188
- </optional>
189
- <optional>
190
- <ref name="tname"/>
191
- </optional>
192
- <oneOrMore>
193
- <ref name="paragraph"/>
194
- </oneOrMore>
195
- </element>
139
+ <define name="NoteAttr">
140
+ <optional>
141
+ <attribute name="removeInRFC"/>
142
+ </optional>
196
143
  </define>
197
- <define name="pre">
198
- <element name="pre">
199
- <attribute name="id">
200
- <data type="ID"/>
201
- </attribute>
202
- <optional>
203
- <attribute name="alt"/>
204
- </optional>
205
- <optional>
206
- <attribute name="align"/>
207
- </optional>
208
- <optional>
209
- <ref name="tname"/>
210
- </optional>
211
- <text/>
212
- <zeroOrMore>
213
- <ref name="note"/>
214
- </zeroOrMore>
215
- </element>
144
+ <define name="NoteBody">
145
+ <optional>
146
+ <ref name="tname"/>
147
+ </optional>
148
+ <oneOrMore>
149
+ <ref name="paragraph"/>
150
+ </oneOrMore>
216
151
  </define>
217
- <define name="image">
218
- <element name="image">
219
- <attribute name="id">
220
- <data type="ID"/>
221
- </attribute>
222
- <attribute name="src">
223
- <data type="anyURI"/>
224
- </attribute>
225
- <attribute name="mimetype"/>
226
- <optional>
227
- <attribute name="filename"/>
228
- </optional>
229
- <optional>
230
- <attribute name="width">
231
- <choice>
232
- <data type="int"/>
233
- <value>auto</value>
234
- </choice>
235
- </attribute>
236
- </optional>
237
- <optional>
238
- <attribute name="height">
239
- <choice>
240
- <data type="int"/>
241
- <value>auto</value>
242
- </choice>
243
- </attribute>
244
- </optional>
245
- <optional>
246
- <attribute name="alt"/>
247
- </optional>
248
- <optional>
249
- <attribute name="title"/>
250
- </optional>
251
- <optional>
252
- <attribute name="longdesc">
253
- <data type="anyURI"/>
254
- </attribute>
255
- </optional>
256
- <optional>
257
- <attribute name="align"/>
258
- </optional>
259
- </element>
152
+ <define name="PreAttr">
153
+ <optional>
154
+ <attribute name="alt"/>
155
+ </optional>
156
+ <optional>
157
+ <attribute name="align"/>
158
+ </optional>
260
159
  </define>
261
- <define name="sourcecode">
262
- <element name="sourcecode">
263
- <attribute name="id">
264
- <data type="ID"/>
265
- </attribute>
266
- <optional>
267
- <attribute name="unnumbered">
268
- <data type="boolean"/>
269
- </attribute>
270
- </optional>
271
- <optional>
272
- <attribute name="number"/>
273
- </optional>
274
- <optional>
275
- <attribute name="subsequence"/>
276
- </optional>
277
- <optional>
278
- <attribute name="lang"/>
279
- </optional>
280
- <optional>
281
- <attribute name="markers"/>
282
- </optional>
283
- <optional>
284
- <ref name="tname"/>
285
- </optional>
286
- <oneOrMore>
287
- <choice>
288
- <text/>
289
- <ref name="callout"/>
290
- </choice>
291
- </oneOrMore>
292
- <zeroOrMore>
293
- <ref name="annotation"/>
294
- </zeroOrMore>
295
- <zeroOrMore>
296
- <ref name="note"/>
297
- </zeroOrMore>
298
- </element>
160
+ <define name="ImageAttr" combine="interleave">
161
+ <optional>
162
+ <attribute name="align"/>
163
+ </optional>
164
+ </define>
165
+ <define name="SourceAttr" combine="interleave">
166
+ <optional>
167
+ <attribute name="number"/>
168
+ </optional>
169
+ <optional>
170
+ <attribute name="markers"/>
171
+ </optional>
299
172
  </define>
300
173
  <define name="xref">
301
174
  <element name="xref">
@@ -343,56 +216,16 @@
343
216
  <ref name="erefTypeURI"/>
344
217
  </element>
345
218
  </define>
346
- <define name="table">
347
- <element name="table">
348
- <attribute name="id">
349
- <data type="ID"/>
350
- </attribute>
351
- <optional>
352
- <attribute name="unnumbered">
353
- <data type="boolean"/>
354
- </attribute>
355
- </optional>
356
- <optional>
357
- <attribute name="number"/>
358
- </optional>
359
- <optional>
360
- <attribute name="subsequence"/>
361
- </optional>
362
- <optional>
363
- <attribute name="alt"/>
364
- </optional>
365
- <optional>
366
- <attribute name="summary"/>
367
- </optional>
368
- <optional>
369
- <attribute name="uri">
370
- <data type="anyURI"/>
371
- </attribute>
372
- </optional>
373
- <optional>
374
- <attribute name="align"/>
375
- </optional>
376
- <optional>
377
- <attribute name="width"/>
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>
219
+ <define name="TableAttr" combine="interleave">
220
+ <optional>
221
+ <attribute name="number"/>
222
+ </optional>
223
+ <optional>
224
+ <attribute name="align"/>
225
+ </optional>
226
+ <optional>
227
+ <attribute name="width"/>
228
+ </optional>
396
229
  </define>
397
230
  <define name="Clause-Section">
398
231
  <optional>