metanorma-jis 0.5.3 → 0.5.4

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.
@@ -1,13 +1,16 @@
1
1
  module IsoDoc
2
- module Jis
3
- class Counter < IsoDoc::XrefGen::Counter
2
+ module XrefGen
3
+ module OlTypeProvider
4
4
  def ol_type(list, depth)
5
5
  return list["type"].to_sym if list["type"]
6
6
  return :alphabet if depth == 1
7
-
8
7
  @style == :japanese ? :japanese : :arabic
9
8
  end
9
+ end
10
+ end
10
11
 
12
+ module Jis
13
+ class Counter < IsoDoc::XrefGen::Counter
11
14
  def listlabel(_list, depth)
12
15
  case depth
13
16
  when 1 then (96 + @num).chr.to_s
@@ -48,13 +51,6 @@ module IsoDoc
48
51
  @lang == "ja" ? "の" : super
49
52
  end
50
53
 
51
- # KILL
52
- def subfigure_labelx(subfignum)
53
- subfignum.zero? and return ""
54
- sep = @lang == "ja" ? "の" : " "
55
- "#{sep}#{(subfignum + 96).chr})"
56
- end
57
-
58
54
  def subfigure_label(subfignum)
59
55
  subfignum.zero? and return
60
56
  (subfignum + 96).chr
@@ -65,7 +61,7 @@ module IsoDoc
65
61
  end
66
62
 
67
63
  # taken from isodoc to override ISO
68
- def subfigure_anchor(elem, sublabel, label, klass, container: false)
64
+ def subfigure_anchor(elem, sublabel, label, klass, container: false)
69
65
  figlabel = fig_subfig_label(label, sublabel)
70
66
  @anchors[elem["id"]] = anchor_struct(
71
67
  figlabel, elem, @labels[klass] || klass.capitalize, klass,
@@ -79,26 +75,16 @@ def subfigure_anchor(elem, sublabel, label, klass, container: false)
79
75
  end
80
76
  end
81
77
 
82
- # KILL
83
- def annex_name_lblx(clause, num)
84
- obl = "(#{@labels['inform_annex']})"
85
- clause["obligation"] == "normative" and
86
- obl = "(#{@labels['norm_annex']})"
87
- title = Common::case_with_markup(@labels["annex"], "capital",
88
- @script)
89
- "#{title} #{num}<br/>#{obl}"
90
- end
91
-
92
78
  def annex_name_lbl(clause, num)
93
79
  super.gsub(%r{</?strong>}, "")
94
80
  end
95
81
 
96
- def annex_name_anchors1(clause, num, level)
97
- super
98
- # undo ISO "Clause A.2" in favour of "A.2"
99
- level == 2 and
100
- @anchors[clause["id"]][:xref] = semx(clause, num)
101
- end
82
+ def annex_name_anchors1(clause, num, level)
83
+ super
84
+ # undo ISO "Clause A.2" in favour of "A.2"
85
+ level == 2 and
86
+ @anchors[clause["id"]][:xref] = semx(clause, num)
87
+ end
102
88
 
103
89
  def clause_order_main(docxml)
104
90
  [
@@ -106,10 +92,10 @@ end
106
92
  { path: "//clause[@type = 'scope']" },
107
93
  { path: @klass.norm_ref_xpath },
108
94
  { path: "//sections/terms | " \
109
- "//sections/clause[descendant::terms]" },
110
- { path: "//sections/definitions | " \
111
- "//sections/clause[descendant::definitions][not(descendant::terms)]" },
112
- { path: @klass.middle_clause(docxml), multi: true },
95
+ "//sections/clause[descendant::terms]" },
96
+ { path: "//sections/definitions | " \
97
+ "//sections/clause[descendant::definitions][not(descendant::terms)]" },
98
+ { path: @klass.middle_clause(docxml), multi: true },
113
99
  ]
114
100
  end
115
101
 
@@ -155,12 +141,11 @@ end
155
141
  end
156
142
 
157
143
  def commentary_names(clause)
158
- #require "debug" ; binding.b
159
144
  preface_name_anchors(clause, 1, clause_title(clause))
160
145
  clause.xpath(ns(SUBCLAUSES))
161
146
  .each_with_object(clause_counter(0, {})) do |c, i|
162
- commentary_names1(c, clause["id"], nil, i.increment(c).print, 2)
163
- end
147
+ commentary_names1(c, clause["id"], nil, i.increment(c).print, 2)
148
+ end
164
149
  end
165
150
 
166
151
  def commentary_names1(clause, root, parentnum, num, level)
@@ -168,9 +153,9 @@ end
168
153
  commentary_name_anchors(clause, lbl, root, level)
169
154
  clause.xpath(ns(SUBCLAUSES))
170
155
  .each_with_object(clause_counter(0)) do |c, i|
171
- commentary_names1(c, root, lbl, i.increment(c).print,
172
- level + 1)
173
- end
156
+ commentary_names1(c, root, lbl, i.increment(c).print,
157
+ level + 1)
158
+ end
174
159
  end
175
160
 
176
161
  def commentary_name_anchors(clause, num, root, level)
@@ -181,44 +166,12 @@ end
181
166
  elem: @labels["clause"] }
182
167
  end
183
168
 
184
- # KILL ?
185
- def list_item_anchor_namesx(list, list_anchor, depth, prev_label,
186
- refer_list)
187
- c = list_counter(list["start"] ? list["start"].to_i - 1 : 0, {})
188
- list.xpath(ns("./li")).each do |li|
189
- bare_label, label =
190
- list_item_value(li, c, depth,
191
- { list_anchor: list_anchor,
192
- prev_label: prev_label,
193
- refer_list: depth == 1 ? refer_list : nil })
194
- li["id"] ||= "_#{UUIDTools::UUID.random_create}"
195
- @anchors[li["id"]] =
196
- { label: bare_label,
197
- bare_xref: "#{bare_label})",
198
- xref: "#{label}#{list_item_delim}", type: "listitem",
199
- refer_list: refer_list,
200
- container: list_anchor[:container] }
201
- (li.xpath(ns(".//ol")) - li.xpath(ns(".//ol//ol"))).each do |ol|
202
- list_item_anchor_names(ol, list_anchor, depth + 1, label,
203
- refer_list)
204
- end
205
- end
206
- end
207
-
208
- # KILL
209
- def list_anchor_names(s)
210
- super
211
- #require "debug"; binding.b
212
- end
213
-
214
169
  def list_item_value(entry, counter, depth, opts)
215
170
  if depth > 2
216
- # require 'debug'; binding.b
217
- label = counter.increment(entry).listlabel(entry.parent, depth)
218
- s = semx(entry, label)
171
+ label = counter.increment(entry).listlabel(entry.parent, depth)
172
+ s = semx(entry, label)
219
173
  base = @c.decode(opts[:prev_label].gsub(%r{<[^>]+>}, "")).split(/\)\s*/) # List a) 1.1.1
220
174
  label = "#{base[-1].sub(/^の/,'')}#{clausesep}#{label}"
221
- #[label, J=list_item_anchor_label(opts[:prev_label] + delim_wrap(clause_sep) + s, opts[:list_anchor], base[0].sub(/[\p{Zs})]+$/, ""), opts[:refer_list])]
222
175
  [label, opts[:prev_label] + delim_wrap(clausesep) + s]
223
176
  else
224
177
  super
@@ -1701,16 +1701,22 @@ which can be bookmarks as well as block or section references</a:documentation>
1701
1701
  <a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
1702
1702
  The target of a footnote is the location it is embedded in within the text</a:documentation>
1703
1703
  <element name="fn">
1704
- <attribute name="reference">
1705
- <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
1706
- </attribute>
1707
- <oneOrMore>
1708
- <ref name="paragraph">
1709
- <a:documentation>The content of the footnote</a:documentation>
1710
- </ref>
1711
- </oneOrMore>
1704
+ <ref name="FnAttributes"/>
1705
+ <ref name="FnBody"/>
1712
1706
  </element>
1713
1707
  </define>
1708
+ <define name="FnBody">
1709
+ <oneOrMore>
1710
+ <ref name="paragraph">
1711
+ <a:documentation>The content of the footnote</a:documentation>
1712
+ </ref>
1713
+ </oneOrMore>
1714
+ </define>
1715
+ <define name="FnAttributes">
1716
+ <attribute name="reference">
1717
+ <a:documentation>The number of the footnote, used to identify it visually</a:documentation>
1718
+ </attribute>
1719
+ </define>
1714
1720
  <define name="callout">
1715
1721
  <a:documentation>Inline reference to a paragraph or paragraphs, appearing as annotation of source code</a:documentation>
1716
1722
  <element name="callout">
@@ -1,13 +1,14 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
3
- <!--
4
- Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
5
- of relaton
6
-
7
- Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
8
- (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
9
- -->
10
3
  <include href="biblio.rng">
4
+ <!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
5
+ <!--
6
+ Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
7
+ of relaton
8
+
9
+ Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
10
+ (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
11
+ -->
11
12
  <define name="BibData">
12
13
  <a:documentation>The bibliographic description of a standardisation document</a:documentation>
13
14
  <ref name="StandardBibliographicItem"/>
@@ -91,6 +92,9 @@ a standards definition organization</a:documentation>
91
92
  <a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
92
93
  </ref>
93
94
  </zeroOrMore>
95
+ <ref name="DocumentImages">
96
+ <a:documentation>Coverpage and other images to be rendered with document</a:documentation>
97
+ </ref>
94
98
  </define>
95
99
  <define name="doctype">
96
100
  <a:documentation>Classification of the standardisation document</a:documentation>
@@ -268,6 +272,32 @@ and not those document components</a:documentation>
268
272
  </optional>
269
273
  </element>
270
274
  </define>
275
+ <define name="DocumentImages">
276
+ <zeroOrMore>
277
+ <element name="coverpage-image">
278
+ <a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
279
+ <ref name="image-no-id"/>
280
+ </element>
281
+ </zeroOrMore>
282
+ <zeroOrMore>
283
+ <element name="innercoverpage-image">
284
+ <a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
285
+ <ref name="image-no-id"/>
286
+ </element>
287
+ </zeroOrMore>
288
+ <zeroOrMore>
289
+ <element name="tocside-image">
290
+ <a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
291
+ <ref name="image-no-id"/>
292
+ </element>
293
+ </zeroOrMore>
294
+ <zeroOrMore>
295
+ <element name="backpage-image">
296
+ <a:documentation>Images to be displayed on the backpage of the document</a:documentation>
297
+ <ref name="image-no-id"/>
298
+ </element>
299
+ </zeroOrMore>
300
+ </define>
271
301
  <define name="StandardBibliographicItem">
272
302
  <ref name="BibliographicItem"/>
273
303
  <zeroOrMore>
@@ -1,23 +1,25 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- instantiations of this grammar may replace leaf strings
4
- with more elaborated types; e.g. title (text) replaced with
5
- title-main, title-intro, title-part; type replaced with
6
- enum.
7
-
8
- some renaming at leaf nodes is permissible
9
-
10
- obligations can change both from optional to mandatory,
11
- and from mandatory to optional; optional elements may
12
- be omitted; freely positioned alternatives may be replaced
13
- with strict ordering
14
-
15
- DO NOT introduce a namespace here. We do not want a distinct namespace
16
- for these elements, and a distinct namespace for any grammar inheriting
17
- these elements; we just want one namespace for any child grammars
18
- of this.
19
- -->
20
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!--
4
+ ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix
5
+
6
+ Instantiations of this grammar may replace leaf strings
7
+ with more elaborated types; e.g. title (text) replaced with
8
+ title-main, title-intro, title-part; type replaced with
9
+ enum.
10
+
11
+ Some renaming at leaf nodes is permissible
12
+
13
+ Obligations can change both from optional to mandatory,
14
+ and from mandatory to optional; optional elements may
15
+ be omitted; freely positioned alternatives may be replaced
16
+ with strict ordering
17
+
18
+ DO NOT introduce a namespace here. We do not want a distinct namespace
19
+ for these elements, and a distinct namespace for any grammar inheriting
20
+ these elements; we just want one namespace for any child grammars
21
+ of this.
22
+ -->
21
23
  <!--
22
24
  https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
23
25
  iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
@@ -1241,6 +1243,11 @@ Refer to `BibliographicItem` for definitions</a:documentation>
1241
1243
  </define>
1242
1244
  <define name="formattedref">
1243
1245
  <element name="formattedref">
1246
+ <optional>
1247
+ <attribute name="format">
1248
+ <a:documentation>format of formatted reference; Metanorma assumes references are formatted as Metanorma XML</a:documentation>
1249
+ </attribute>
1250
+ </optional>
1244
1251
  <oneOrMore>
1245
1252
  <ref name="TextElement"/>
1246
1253
  </oneOrMore>
@@ -1812,6 +1819,11 @@ May be used to differentiate rendering of notes in bibliographies</a:documentati
1812
1819
  <a:documentation>Abstract of bibliographic item</a:documentation>
1813
1820
  <element name="abstract">
1814
1821
  <ref name="LocalizedStringAttributes"/>
1822
+ <optional>
1823
+ <attribute name="format">
1824
+ <a:documentation>What format the formatted abstract is in. In Metanorma, assumed to be Metanorma XML</a:documentation>
1825
+ </attribute>
1826
+ </optional>
1815
1827
  <choice>
1816
1828
  <oneOrMore>
1817
1829
  <ref name="BasicBlockNoId">
@@ -1,24 +1,27 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!--
3
- instantiations of this grammar may replace leaf strings
4
- with more elaborated types; e.g. title (text) replaced with
5
- title-main, title-intro, title-part; type replaced with
6
- enum.
7
-
8
- some renaming at leaf nodes is permissible
9
-
10
- obligations can change both from optional to mandatory,
11
- and from mandatory to optional; optional elements may
12
- be omitted; freely positioned alternatives may be replaced
13
- with strict ordering
14
-
15
- DO NOT introduce a namespace here. We do not want a distinct namespace
16
- for these elements, and a distinct namespace for any grammar inheriting
17
- these elements; we just want one namespace for any child grammars
18
- of this.
19
- -->
20
- <!-- VERSION v2.0.2 -->
21
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
+ <!-- VERSION v2.0.3 -->
4
+
5
+ <!--
6
+ ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
7
+
8
+ instantiations of this grammar may replace leaf strings
9
+ with more elaborated types; e.g. title (text) replaced with
10
+ title-main, title-intro, title-part; type replaced with
11
+ enum.
12
+
13
+ some renaming at leaf nodes is permissible
14
+
15
+ obligations can change both from optional to mandatory,
16
+ and from mandatory to optional; optional elements may
17
+ be omitted; freely positioned alternatives may be replaced
18
+ with strict ordering
19
+
20
+ DO NOT introduce a namespace here. We do not want a distinct namespace
21
+ for these elements, and a distinct namespace for any grammar inheriting
22
+ these elements; we just want one namespace for any child grammars
23
+ of this.
24
+ -->
22
25
  <include href="reqt.rng"/>
23
26
  <include href="basicdoc.rng">
24
27
  <define name="amend">
@@ -33,15 +36,6 @@
33
36
  </zeroOrMore>
34
37
  </element>
35
38
  </define>
36
- <define name="fn" combine="interleave">
37
- <optional>
38
- <attribute name="hiddenref">
39
- <a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
40
- This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
41
- <data type="boolean"/>
42
- </attribute>
43
- </optional>
44
- </define>
45
39
  <define name="index-primary">
46
40
  <element name="primary">
47
41
  <oneOrMore>
@@ -423,20 +417,12 @@ normative or informative references, some split references into sections organiz
423
417
  </oneOrMore>
424
418
  </choice>
425
419
  </define>
426
- <define name="TdAttributes" combine="interleave">
427
- <attribute name="style">
428
- <a:documentation>CSS style: only background-color supported</a:documentation>
429
- </attribute>
430
- </define>
431
- <define name="ThAttributes" combine="interleave">
432
- <attribute name="style">
433
- <a:documentation>CSS style: only background-color supported</a:documentation>
434
- </attribute>
435
- </define>
436
420
  <define name="TrAttributes">
437
- <attribute name="style">
438
- <a:documentation>CSS style: only background-color supported</a:documentation>
439
- </attribute>
421
+ <optional>
422
+ <attribute name="style">
423
+ <a:documentation>CSS style: only background-color supported</a:documentation>
424
+ </attribute>
425
+ </optional>
440
426
  </define>
441
427
  <define name="table-note">
442
428
  <element name="note">
@@ -500,6 +486,22 @@ gives an explicit page orientation</a:documentation>
500
486
  </define>
501
487
  </include>
502
488
  <!-- end overrides -->
489
+ <define name="FnAttributes" combine="interleave">
490
+ <optional>
491
+ <attribute name="hiddenref">
492
+ <a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
493
+ This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
494
+ <data type="boolean"/>
495
+ </attribute>
496
+ </optional>
497
+ </define>
498
+ <define name="TdAttributes" combine="interleave">
499
+ <optional>
500
+ <attribute name="style">
501
+ <a:documentation>CSS style: only background-color supported</a:documentation>
502
+ </attribute>
503
+ </optional>
504
+ </define>
503
505
  <define name="NumberingAttributes" combine="interleave">
504
506
  <optional>
505
507
  <attribute name="number">
@@ -678,6 +680,13 @@ titlecase, or lowercase</a:documentation>
678
680
  </attribute>
679
681
  </optional>
680
682
  </define>
683
+ <define name="Basic-Section-Attributes" combine="interleave">
684
+ <optional>
685
+ <attribute name="obligation">
686
+ <ref name="ObligationType"/>
687
+ </attribute>
688
+ </optional>
689
+ </define>
681
690
  <define name="ObligationType">
682
691
  <a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
683
692
  <choice>
@@ -1192,13 +1201,6 @@ numbers</a:documentation>
1192
1201
  </attribute>
1193
1202
  </optional>
1194
1203
  </define>
1195
- <define name="Basic-Section-Attributes" combine="interleave">
1196
- <optional>
1197
- <attribute name="obligation">
1198
- <ref name="ObligationType"/>
1199
- </attribute>
1200
- </optional>
1201
- </define>
1202
1204
  <define name="reference-clause">
1203
1205
  <a:documentation>References clause with recursive nesting</a:documentation>
1204
1206
  <element name="clause">
@@ -1239,7 +1241,7 @@ numbers</a:documentation>
1239
1241
  </choice>
1240
1242
  </attribute>
1241
1243
  <attribute name="flavor">
1242
- <a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
1244
+ <a:documentation>Metanorma flavor, indicating SDO whose requirements the realisation aligns to</a:documentation>
1243
1245
  </attribute>
1244
1246
  </define>
1245
1247
  <define name="standard-document">
@@ -1249,6 +1251,11 @@ numbers</a:documentation>
1249
1251
  <ref name="bibdata">
1250
1252
  <a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
1251
1253
  </ref>
1254
+ <zeroOrMore>
1255
+ <ref name="termdocsource">
1256
+ <a:documentation>Source for term definitions in the document</a:documentation>
1257
+ </ref>
1258
+ </zeroOrMore>
1252
1259
  <optional>
1253
1260
  <ref name="misccontainer">
1254
1261
  <a:documentation>Extension point for extraneous elements that need to be added to standards document as data</a:documentation>
@@ -1259,34 +1266,7 @@ numbers</a:documentation>
1259
1266
  <a:documentation>Front matter that is repeated at the start of documents issued from an SDO, with content not specific to the document</a:documentation>
1260
1267
  </ref>
1261
1268
  </optional>
1262
- <optional>
1263
- <ref name="preface">
1264
- <a:documentation>Prefatory sections</a:documentation>
1265
- </ref>
1266
- </optional>
1267
- <ref name="sections">
1268
- <a:documentation>Main body of document</a:documentation>
1269
- </ref>
1270
- <zeroOrMore>
1271
- <ref name="annex">
1272
- <a:documentation>Annex sections</a:documentation>
1273
- </ref>
1274
- </zeroOrMore>
1275
- <optional>
1276
- <ref name="bibliography">
1277
- <a:documentation>Bibliographic sections</a:documentation>
1278
- </ref>
1279
- </optional>
1280
- <zeroOrMore>
1281
- <ref name="indexsect">
1282
- <a:documentation>Index of the document</a:documentation>
1283
- </ref>
1284
- </zeroOrMore>
1285
- <optional>
1286
- <ref name="colophon">
1287
- <a:documentation>Colophon or postface material</a:documentation>
1288
- </ref>
1289
- </optional>
1269
+ <ref name="DocumentBody"/>
1290
1270
  <optional>
1291
1271
  <ref name="review-container">
1292
1272
  <a:documentation>Annotations to the document</a:documentation>
@@ -1294,6 +1274,36 @@ numbers</a:documentation>
1294
1274
  </optional>
1295
1275
  </element>
1296
1276
  </define>
1277
+ <define name="DocumentBody">
1278
+ <optional>
1279
+ <ref name="preface">
1280
+ <a:documentation>Prefatory sections</a:documentation>
1281
+ </ref>
1282
+ </optional>
1283
+ <ref name="sections">
1284
+ <a:documentation>Main body of document</a:documentation>
1285
+ </ref>
1286
+ <zeroOrMore>
1287
+ <ref name="annex">
1288
+ <a:documentation>Annex sections</a:documentation>
1289
+ </ref>
1290
+ </zeroOrMore>
1291
+ <optional>
1292
+ <ref name="bibliography">
1293
+ <a:documentation>Bibliographic sections</a:documentation>
1294
+ </ref>
1295
+ </optional>
1296
+ <zeroOrMore>
1297
+ <ref name="indexsect">
1298
+ <a:documentation>Index of the document</a:documentation>
1299
+ </ref>
1300
+ </zeroOrMore>
1301
+ <optional>
1302
+ <ref name="colophon">
1303
+ <a:documentation>Colophon or postface material</a:documentation>
1304
+ </ref>
1305
+ </optional>
1306
+ </define>
1297
1307
  <define name="misccontainer">
1298
1308
  <a:documentation>Elements added to metanorma-extension are open-ended, and constitute source data</a:documentation>
1299
1309
  <element name="metanorma-extension">
@@ -1608,9 +1618,7 @@ used in document amendments</a:documentation>
1608
1618
  <define name="term">
1609
1619
  <a:documentation>Terminology entry with its definition</a:documentation>
1610
1620
  <element name="term">
1611
- <ref name="OptionalId"/>
1612
- <ref name="LocalizedStringAttributes"/>
1613
- <ref name="BlockAttributes"/>
1621
+ <ref name="TermAttributes"/>
1614
1622
  <oneOrMore>
1615
1623
  <ref name="preferred">
1616
1624
  <a:documentation>One or more names under which the term being defined is canonically known</a:documentation>
@@ -1662,6 +1670,11 @@ used in document amendments</a:documentation>
1662
1670
  </ref>
1663
1671
  </element>
1664
1672
  </define>
1673
+ <define name="TermAttributes">
1674
+ <ref name="OptionalId"/>
1675
+ <ref name="LocalizedStringAttributes"/>
1676
+ <ref name="BlockAttributes"/>
1677
+ </define>
1665
1678
  <define name="preferred">
1666
1679
  <element name="preferred">
1667
1680
  <ref name="Designation"/>
@@ -2323,26 +2336,32 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
2323
2336
  </element>
2324
2337
  </define>
2325
2338
  <define name="ul_li">
2326
- <a:documentation>Unorderd list item for standards documents</a:documentation>
2339
+ <a:documentation>Unordered list item for standards documents</a:documentation>
2327
2340
  <element name="li">
2328
2341
  <ref name="OptionalId"/>
2329
- <optional>
2330
- <attribute name="uncheckedcheckbox">
2331
- <a:documentation>Include a checkbox for the list item</a:documentation>
2332
- <data type="boolean"/>
2333
- </attribute>
2334
- </optional>
2335
- <optional>
2336
- <attribute name="checkedcheckbox">
2337
- <a:documentation>Check the checkbox for the list item</a:documentation>
2338
- <data type="boolean"/>
2339
- </attribute>
2340
- </optional>
2341
- <oneOrMore>
2342
- <ref name="BasicBlock"/>
2343
- </oneOrMore>
2342
+ <ref name="UlLiAttributes"/>
2343
+ <ref name="UlLiBody"/>
2344
2344
  </element>
2345
2345
  </define>
2346
+ <define name="UlLiBody">
2347
+ <oneOrMore>
2348
+ <ref name="BasicBlock"/>
2349
+ </oneOrMore>
2350
+ </define>
2351
+ <define name="UlLiAttributes">
2352
+ <optional>
2353
+ <attribute name="uncheckedcheckbox">
2354
+ <a:documentation>Include a checkbox for the list item</a:documentation>
2355
+ <data type="boolean"/>
2356
+ </attribute>
2357
+ </optional>
2358
+ <optional>
2359
+ <attribute name="checkedcheckbox">
2360
+ <a:documentation>Check the checkbox for the list item</a:documentation>
2361
+ <data type="boolean"/>
2362
+ </attribute>
2363
+ </optional>
2364
+ </define>
2346
2365
  <define name="floating-title">
2347
2366
  <a:documentation>A floating title, outside of the clause hierarchy of the document</a:documentation>
2348
2367
  <element name="floating-title">