metanorma-iso 1.6.1 → 1.7.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +11 -41
  3. data/.gitignore +2 -0
  4. data/.rubocop.yml +6 -2
  5. data/lib/asciidoctor/iso/base.rb +13 -13
  6. data/lib/asciidoctor/iso/basicdoc.rng +5 -3
  7. data/lib/asciidoctor/iso/biblio.rng +4 -6
  8. data/lib/asciidoctor/iso/cleanup.rb +1 -1
  9. data/lib/asciidoctor/iso/front.rb +6 -6
  10. data/lib/asciidoctor/iso/front_id.rb +30 -25
  11. data/lib/asciidoctor/iso/isodoc.rng +108 -2
  12. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  13. data/lib/asciidoctor/iso/isostandard.rng +17 -97
  14. data/lib/asciidoctor/iso/validate.rb +68 -1
  15. data/lib/asciidoctor/iso/validate_title.rb +21 -13
  16. data/lib/isodoc/iso/base_convert.rb +11 -0
  17. data/lib/isodoc/iso/html/header.html +12 -12
  18. data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
  19. data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
  20. data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
  21. data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
  22. data/lib/isodoc/iso/html_convert.rb +2 -2
  23. data/lib/isodoc/iso/i18n-en.yaml +6 -0
  24. data/lib/isodoc/iso/i18n-fr.yaml +4 -0
  25. data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
  26. data/lib/isodoc/iso/index.rb +140 -0
  27. data/lib/isodoc/iso/iso.amendment.xsl +1009 -321
  28. data/lib/isodoc/iso/iso.international-standard.xsl +1009 -321
  29. data/lib/isodoc/iso/presentation_xml_convert.rb +1 -4
  30. data/lib/isodoc/iso/word_convert.rb +2 -2
  31. data/lib/isodoc/iso/xref.rb +5 -0
  32. data/lib/metanorma/iso/version.rb +1 -1
  33. data/metanorma-iso.gemspec +4 -4
  34. data/spec/asciidoctor/amd_spec.rb +696 -0
  35. data/spec/asciidoctor/base_spec.rb +704 -0
  36. data/spec/asciidoctor/blocks_spec.rb +527 -0
  37. data/spec/asciidoctor/cleanup_spec.rb +1134 -0
  38. data/spec/asciidoctor/inline_spec.rb +195 -0
  39. data/spec/asciidoctor/lists_spec.rb +197 -0
  40. data/spec/asciidoctor/refs_spec.rb +375 -0
  41. data/spec/asciidoctor/section_spec.rb +393 -0
  42. data/spec/asciidoctor/table_spec.rb +329 -0
  43. data/spec/asciidoctor/validate_spec.rb +1572 -0
  44. data/spec/isodoc/amd_spec.rb +967 -946
  45. data/spec/isodoc/blocks_spec.rb +530 -507
  46. data/spec/isodoc/i18n_spec.rb +953 -911
  47. data/spec/isodoc/inline_spec.rb +355 -293
  48. data/spec/isodoc/iso_spec.rb +340 -316
  49. data/spec/isodoc/metadata_spec.rb +392 -382
  50. data/spec/isodoc/postproc_spec.rb +834 -656
  51. data/spec/isodoc/ref_spec.rb +374 -331
  52. data/spec/isodoc/section_spec.rb +821 -519
  53. data/spec/isodoc/table_spec.rb +472 -411
  54. data/spec/isodoc/terms_spec.rb +209 -185
  55. data/spec/isodoc/xref_spec.rb +1370 -1236
  56. data/spec/metanorma/processor_spec.rb +28 -26
  57. data/spec/spec_helper.rb +186 -189
  58. metadata +26 -27
  59. data/.rubocop.ribose.yml +0 -66
  60. data/spec/asciidoctor-iso/amd_spec.rb +0 -694
  61. data/spec/asciidoctor-iso/base_spec.rb +0 -713
  62. data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
  63. data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
  64. data/spec/asciidoctor-iso/inline_spec.rb +0 -170
  65. data/spec/asciidoctor-iso/lists_spec.rb +0 -190
  66. data/spec/asciidoctor-iso/refs_spec.rb +0 -317
  67. data/spec/asciidoctor-iso/section_spec.rb +0 -362
  68. data/spec/asciidoctor-iso/table_spec.rb +0 -313
  69. data/spec/asciidoctor-iso/validate_spec.rb +0 -1550
  70. data/spec/assets/xref_error.adoc +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 769601244fc001de9523edde3e6b139a897df0c82a255b786659a83a2e32d8a5
4
- data.tar.gz: 1ea613b3740ec30cc508fa5817bed662f3fe539b7bf03e2cf7e40e4ab1e1c8c4
3
+ metadata.gz: e78f6a52feda554f9e3578e30ffd3af32afe6c771d16414f584ceadd38589b13
4
+ data.tar.gz: 2da68557d15c9436c6dc310203895e5611c64331b0f038e66590ad4611bdb5db
5
5
  SHA512:
6
- metadata.gz: 870aaeca24c5e5878441a8346c2dc0d8d8cdd19604c50399c38b8af18bd29a90ab3c0dd8c8d080b977c35efc794bbfbffa4ca233113c3c3a103d90542981ba90
7
- data.tar.gz: a6bb8b2d6f598ddf12b8982fa1203165d07f94df83a0f2f7d96eba635834b69e0420e7e46e5cfe86b5ba0283a553106a7941cd06be868032dec6e0179dc1fbb4
6
+ metadata.gz: f1d80f1af14c5abfd4cc74a0e91dbcc0e4414fd46105ebbd80507871bba8ea788c1e8b09525b8672d85bd4f453d07b5a2b2621a96ebc63270999a2b9989ecbaa
7
+ data.tar.gz: '09b997180fa6f3c0a1ac2298efda92fc634f5ea1404115c1d65104da739ca278f6a134ee9114ba2b1d53fc4c9415ba6655a7612982479964b5b1bb2c5790a85a'
@@ -16,17 +16,17 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.6', '2.5', '2.4' ]
19
+ ruby: [ '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
  include:
23
- - ruby: '2.7'
23
+ - ruby: '3.0'
24
24
  os: 'ubuntu-latest'
25
25
  experimental: true
26
- - ruby: '2.7'
26
+ - ruby: '3.0'
27
27
  os: 'windows-latest'
28
28
  experimental: true
29
- - ruby: '2.7'
29
+ - ruby: '3.0'
30
30
  os: 'macos-latest'
31
31
  experimental: true
32
32
  steps:
@@ -35,49 +35,19 @@ jobs:
35
35
  - uses: ruby/setup-ruby@v1
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
38
39
 
39
- - if: matrix.os == 'macos-latest'
40
- run: brew install autoconf automake libtool
41
-
42
- - uses: actions/cache@v2
43
- with:
44
- path: vendor/bundle
45
- key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
46
- restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
47
-
48
- - run: bundle config set path 'vendor/bundle'
49
-
50
- - run: bundle install --jobs 4 --retry 3
51
-
52
- - name: install plantuml ubuntu
53
- if: matrix.os == 'ubuntu-latest'
54
- uses: nick-invision/retry@v1
55
- with:
56
- polling_interval_seconds: 5
57
- timeout_minutes: 5
58
- max_attempts: 3
59
- command: >
60
- sudo apt-get update -y && sudo bash -c
61
- "curl -L https://github.com/metanorma/plantuml-install/raw/master/ubuntu.sh | bash"
62
-
63
- - if: matrix.os == 'macos-latest'
64
- run: brew install plantuml
65
-
66
- - if: matrix.os == 'windows-latest'
67
- run: cinst -y plantuml
40
+ - uses: metanorma/metanorma-build-scripts/plantuml-setup-action@master
68
41
 
69
42
  - run: bundle exec rake
70
43
 
71
44
  tests-passed:
72
45
  needs: rake
73
46
  runs-on: ubuntu-latest
74
- continue-on-error: true
75
47
  steps:
76
- - name: Trigger tests passed event
77
- uses: Sibz/github-status-action@v1
48
+ - uses: peter-evans/repository-dispatch@v1
78
49
  with:
79
- authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
80
- context: 'tests-passed-successfully'
81
- description: 'Tests passed successfully'
82
- state: 'success'
83
- sha: ${{ github.event.pull_request.head.sha || github.sha }}
50
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
51
+ repository: ${{ github.repository }}
52
+ event-type: notify
53
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.gitignore CHANGED
@@ -9,3 +9,5 @@ spec/examples/rice.doc
9
9
  spec/examples/rice.html
10
10
  spec/examples/rice.xml
11
11
  spec/examples/rice_files/
12
+
13
+ .rubocop-https--*
data/.rubocop.yml CHANGED
@@ -1,10 +1,14 @@
1
1
  # This project follows the Ribose OSS style guide.
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
-
5
4
  inherit_from:
6
5
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
+
7
+ # local repo-specific modifications
8
+
7
9
  AllCops:
8
- TargetRubyVersion: 2.3
10
+ DisplayCopNames: false
11
+ StyleGuideCopsOnly: false
12
+ TargetRubyVersion: 2.4
9
13
  Rails:
10
14
  Enabled: true
@@ -44,23 +44,23 @@ module Asciidoctor
44
44
  @amd = %w(amendment technical-corrigendum).include? doctype(node)
45
45
  end
46
46
 
47
- def ol_attrs(node)
47
+ def ol_attrs(node)
48
48
  attr_code(keep_attrs(node).
49
- merge(id: ::Asciidoctor::Standoc::Utils::anchor_or_uuid(node)))
49
+ merge(id: ::Metanorma::Utils::anchor_or_uuid(node)))
50
50
  end
51
51
 
52
52
  def outputs(node, ret)
53
- File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
54
- presentation_xml_converter(node).convert(@filename + ".xml")
55
- html_converter_alt(node).convert(@filename + ".presentation.xml",
56
- nil, false, "#{@filename}_alt.html")
57
- html_converter(node).convert(@filename + ".presentation.xml",
58
- nil, false, "#{@filename}.html")
59
- doc_converter(node).convert(@filename + ".presentation.xml",
60
- nil, false, "#{@filename}.doc")
61
- pdf_converter(node)&.convert(@filename + ".presentation.xml",
62
- nil, false, "#{@filename}.pdf")
63
- #sts_converter(node)&.convert(@filename + ".xml")
53
+ File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
54
+ presentation_xml_converter(node).convert(@filename + ".xml")
55
+ html_converter_alt(node).convert(@filename + ".presentation.xml",
56
+ nil, false, "#{@filename}_alt.html")
57
+ html_converter(node).convert(@filename + ".presentation.xml",
58
+ nil, false, "#{@filename}.html")
59
+ doc_converter(node).convert(@filename + ".presentation.xml",
60
+ nil, false, "#{@filename}.doc")
61
+ pdf_converter(node)&.convert(@filename + ".presentation.xml",
62
+ nil, false, "#{@filename}.pdf")
63
+ #sts_converter(node)&.convert(@filename + ".xml")
64
64
  end
65
65
  end
66
66
  end
@@ -729,9 +729,11 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="to">
733
- <data type="IDREF"/>
734
- </attribute>
732
+ <optional>
733
+ <attribute name="to">
734
+ <data type="IDREF"/>
735
+ </attribute>
736
+ </optional>
735
737
  <element name="primary">
736
738
  <oneOrMore>
737
739
  <ref name="PureTextElement"/>
@@ -124,7 +124,7 @@
124
124
  <value>application/tei+xml</value>
125
125
  <value>text/x-asciidoc</value>
126
126
  <value>text/markdown</value>
127
- <value>application/x-isodoc+xml</value>
127
+ <value>application/x-metanorma+xml</value>
128
128
  <text/>
129
129
  </choice>
130
130
  </attribute>
@@ -452,6 +452,7 @@
452
452
  <attribute name="type">
453
453
  <choice>
454
454
  <value>isni</value>
455
+ <value>orcid</value>
455
456
  <value>uri</value>
456
457
  </choice>
457
458
  </attribute>
@@ -461,10 +462,7 @@
461
462
  <define name="org-identifier">
462
463
  <element name="identifier">
463
464
  <attribute name="type">
464
- <choice>
465
- <value>orcid</value>
466
- <value>uri</value>
467
- </choice>
465
+ <data type="string" datatypeLibrary=""/>
468
466
  </attribute>
469
467
  <text/>
470
468
  </element>
@@ -1106,7 +1104,7 @@
1106
1104
  <value>complementOf</value>
1107
1105
  <value>obsoletes</value>
1108
1106
  <value>obsoletedBy</value>
1109
- <value>cited</value>
1107
+ <value>cites</value>
1110
1108
  <value>isCitedIn</value>
1111
1109
  </choice>
1112
1110
  </define>
@@ -61,7 +61,7 @@ module Asciidoctor
61
61
  id.content = id_prefix(prefix, id)
62
62
  end
63
63
 
64
- def format_ref(ref, type, isopub)
64
+ def format_ref(ref, type)
65
65
  ref = ref.sub(/ \(All Parts\)/i, "")
66
66
  super
67
67
  end
@@ -67,7 +67,7 @@ module Asciidoctor
67
67
  stage = get_stage(node)
68
68
  substage = get_substage(node)
69
69
  xml.status do |s|
70
- s.stage stage, **attr_code(abbreviation: stage_abbr(stage, substage, doctype(node)))
70
+ s.stage stage, **attr_code(abbreviation: cover_stage_abbr(node))
71
71
  s.substage substage
72
72
  node.attr("iteration") && (s.iteration node.attr("iteration"))
73
73
  end
@@ -85,27 +85,27 @@ module Asciidoctor
85
85
  def title_intro(node, t, lang, at)
86
86
  return unless node.attr("title-intro-#{lang}")
87
87
  t.title(**attr_code(at.merge(type: "title-intro"))) do |t1|
88
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-intro-#{lang}"))
88
+ t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-intro-#{lang}"))
89
89
  end
90
90
  end
91
91
 
92
92
  def title_main(node, t, lang, at)
93
93
  t.title **attr_code(at.merge(type: "title-main")) do |t1|
94
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-main-#{lang}"))
94
+ t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-main-#{lang}"))
95
95
  end
96
96
  end
97
97
 
98
98
  def title_part(node, t, lang, at)
99
99
  return unless node.attr("title-part-#{lang}")
100
100
  t.title(**attr_code(at.merge(type: "title-part"))) do |t1|
101
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-part-#{lang}"))
101
+ t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-part-#{lang}"))
102
102
  end
103
103
  end
104
104
 
105
105
  def title_amd(node, t, lang, at)
106
106
  return unless node.attr("title-amendment-#{lang}")
107
107
  t.title(**attr_code(at.merge(type: "title-amd"))) do |t1|
108
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(node.attr("title-amendment-#{lang}"))
108
+ t1 << Metanorma::Utils::asciidoc_sub(node.attr("title-amendment-#{lang}"))
109
109
  end
110
110
  end
111
111
 
@@ -118,7 +118,7 @@ module Asciidoctor
118
118
  title = "#{title} -- #{part}" if part
119
119
  title = "#{title} -- #{amd}" if amd && @amd
120
120
  t.title **attr_code(at.merge(type: "main")) do |t1|
121
- t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(title)
121
+ t1 << Metanorma::Utils::asciidoc_sub(title)
122
122
  end
123
123
  end
124
124
 
@@ -11,7 +11,7 @@ module Asciidoctor
11
11
  class Converter < Standoc::Converter
12
12
  STAGE_ABBRS = {
13
13
  "00": "PWI",
14
- "10": "NWIP",
14
+ "10": "NP",
15
15
  "20": "WD",
16
16
  "30": "CD",
17
17
  "40": "DIS",
@@ -37,15 +37,11 @@ module Asciidoctor
37
37
  return nil if stage.to_i > 60
38
38
  ret = STAGE_ABBRS[stage.to_sym]
39
39
  ret = "PRF" if stage == "60" && substage == "00"
40
+ ret = "AWI" if stage == "10" && substage == "99"
40
41
  if %w(amendment technical-corrigendum technical-report
41
42
  technical-specification).include?(doctype)
42
- ret = "NP" if stage == "10"
43
- ret = "AWI" if stage == "10" && substage == "99"
44
- ret = "D" if stage == "40" and doctype == "amendment"
45
- ret = "FD" if stage == "50" and
46
- %w(amendment technical-corrigendum).include?(doctype)
47
- ret = "D" if stage == "50" and
48
- %w(technical-report technical-specification).include?(doctype)
43
+ ret = "D" if stage == "40" && doctype == "amendment"
44
+ ret = "FD" if stage == "50" && %w(amendment technical-corrigendum).include?(doctype)
49
45
  end
50
46
  ret
51
47
  end
@@ -54,8 +50,7 @@ module Asciidoctor
54
50
  return "Proof" if stage == "60" && substage == "00"
55
51
  ret = STAGE_NAMES[stage.to_sym]
56
52
  if iteration && %w(20 30).include?(stage)
57
- prefix = iteration.to_i.localize(@lang.to_sym).
58
- to_rbnf_s("SpelloutRules", "spellout-ordinal")
53
+ prefix = iteration.to_i.localize(@lang.to_sym).to_rbnf_s("SpelloutRules", "spellout-ordinal")
59
54
  ret = "#{prefix.capitalize} #{ret.downcase}"
60
55
  end
61
56
  ret
@@ -70,16 +65,13 @@ module Asciidoctor
70
65
  end
71
66
 
72
67
  def iso_id(node, xml)
73
- return unless !@amd && node.attr("docnumber") ||
74
- @amd && node.attr("updates")
68
+ return unless !@amd && node.attr("docnumber") || @amd && node.attr("updates")
75
69
  dn = iso_id1(node)
76
70
  dn1 = id_stage_prefix(dn, node, false)
77
71
  dn2 = id_stage_prefix(dn, node, true)
78
72
  xml.docidentifier dn1, **attr_code(type: "ISO")
79
- xml.docidentifier id_langsuffix(dn1, node),
80
- **attr_code(type: "iso-with-lang")
81
- xml.docidentifier id_langsuffix(dn2, node),
82
- **attr_code(type: "iso-reference")
73
+ xml.docidentifier id_langsuffix(dn1, node), **attr_code(type: "iso-with-lang")
74
+ xml.docidentifier id_langsuffix(dn2, node), **attr_code(type: "iso-reference")
83
75
  end
84
76
 
85
77
  def iso_id1(node)
@@ -132,18 +124,29 @@ module Asciidoctor
132
124
  dn
133
125
  end
134
126
 
135
- def id_stage_abbr(stage, substage, node)
136
- ret = IsoDoc::Iso::Metadata.new("en", "Latn", @i18n).
137
- status_abbrev(stage_abbr(stage, substage, doctype(node)),
138
- substage, node.attr("iteration"),
139
- node.attr("draft"), doctype(node))
140
- if %w(amendment technical-corrigendum amendment
141
- technical-corrigendum).include?(doctype(node))
142
- ret = ret + " " unless %w(40 50).include?(stage)
127
+ def id_stage_abbr(stage, substage, node, bare = false)
128
+ ret = bare ?
129
+ IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
130
+ .status_abbrev(stage_abbr(stage, substage, doctype(node)),
131
+ substage, nil, nil, doctype(node)) :
132
+ IsoDoc::Iso::Metadata.new("en", "Latn", @i18n)
133
+ .status_abbrev(stage_abbr(stage, substage, doctype(node)),
134
+ substage, node.attr("iteration"),
135
+ node.attr("draft"), doctype(node))
136
+ if %w(amendment technical-corrigendum technical-report technical-specification).include?(doctype(node))
137
+ ret = ret + " " unless %w(D FD).include?(ret)
143
138
  end
144
139
  ret
145
140
  end
146
141
 
142
+ def cover_stage_abbr(node)
143
+ stage = get_stage(node)
144
+ abbr = id_stage_abbr(get_stage(node), get_substage(node), node, true)
145
+ typeabbr = get_typeabbr(node, true)
146
+ typeabbr = "" if stage.to_i > 50 || stage.to_i == 60 && get_substage(node).to_i < 60
147
+ "#{abbr}#{typeabbr}".strip
148
+ end
149
+
147
150
  def id_stage_prefix(dn, node, force_year)
148
151
  stage = get_stage(node)
149
152
  typeabbr = get_typeabbr(node)
@@ -183,10 +186,12 @@ module Asciidoctor
183
186
  node.attr("docsubstage") || ( stage == "60" ? "60" : "00" )
184
187
  end
185
188
 
186
- def get_typeabbr(node)
189
+ def get_typeabbr(node, amd = false)
187
190
  case doctype(node)
188
191
  when "technical-report" then "TR "
189
192
  when "technical-specification" then "TS "
193
+ when "amendment" then (amd ? "Amd " : "")
194
+ when "technical-corrigendum" then (amd ? "Cor " : "")
190
195
  else
191
196
  nil
192
197
  end
@@ -102,7 +102,7 @@
102
102
  </attribute>
103
103
  </optional>
104
104
  <oneOrMore>
105
- <ref name="li"/>
105
+ <ref name="ul_li"/>
106
106
  </oneOrMore>
107
107
  <zeroOrMore>
108
108
  <ref name="note"/>
@@ -789,6 +789,9 @@
789
789
  <attribute name="width"/>
790
790
  </element>
791
791
  </define>
792
+ <define name="BibItemType" combine="choice">
793
+ <value>internal</value>
794
+ </define>
792
795
  <define name="TextElement" combine="choice">
793
796
  <ref name="concept"/>
794
797
  </define>
@@ -809,6 +812,8 @@
809
812
  <ref name="requirement"/>
810
813
  <ref name="recommendation"/>
811
814
  <ref name="permission"/>
815
+ <ref name="imagemap"/>
816
+ <ref name="svgmap"/>
812
817
  </choice>
813
818
  </define>
814
819
  <define name="bibliography">
@@ -914,6 +919,9 @@
914
919
  </choice>
915
920
  </attribute>
916
921
  <ref name="bibdata"/>
922
+ <optional>
923
+ <ref name="misccontainer"/>
924
+ </optional>
917
925
  <optional>
918
926
  <ref name="boilerplate"/>
919
927
  </optional>
@@ -924,11 +932,21 @@
924
932
  <zeroOrMore>
925
933
  <ref name="annex"/>
926
934
  </zeroOrMore>
935
+ <optional>
936
+ <ref name="bibliography"/>
937
+ </optional>
927
938
  <zeroOrMore>
928
- <ref name="references"/>
939
+ <ref name="indexsect"/>
929
940
  </zeroOrMore>
930
941
  </element>
931
942
  </define>
943
+ <define name="misccontainer">
944
+ <element name="misc-container">
945
+ <oneOrMore>
946
+ <ref name="AnyElement"/>
947
+ </oneOrMore>
948
+ </element>
949
+ </define>
932
950
  <define name="preface">
933
951
  <element name="preface">
934
952
  <oneOrMore>
@@ -952,6 +970,11 @@
952
970
  <ref name="Content-Section"/>
953
971
  </element>
954
972
  </define>
973
+ <define name="indexsect">
974
+ <element name="indexsect">
975
+ <ref name="Content-Section"/>
976
+ </element>
977
+ </define>
955
978
  <define name="boilerplate">
956
979
  <element name="boilerplate">
957
980
  <optional>
@@ -1632,4 +1655,87 @@
1632
1655
  <text/>
1633
1656
  </element>
1634
1657
  </define>
1658
+ <define name="imagemap">
1659
+ <element name="imagemap">
1660
+ <ref name="figure"/>
1661
+ <zeroOrMore>
1662
+ <element name="area">
1663
+ <attribute name="type">
1664
+ <choice>
1665
+ <value>rect</value>
1666
+ <value>circle</value>
1667
+ <value>ellipse</value>
1668
+ <value>poly</value>
1669
+ </choice>
1670
+ </attribute>
1671
+ <choice>
1672
+ <ref name="xref"/>
1673
+ <ref name="hyperlink"/>
1674
+ <ref name="eref"/>
1675
+ </choice>
1676
+ <oneOrMore>
1677
+ <element name="coords">
1678
+ <attribute name="x">
1679
+ <data type="float"/>
1680
+ </attribute>
1681
+ <attribute name="y">
1682
+ <data type="float"/>
1683
+ </attribute>
1684
+ </element>
1685
+ </oneOrMore>
1686
+ <optional>
1687
+ <element name="radius">
1688
+ <attribute name="x">
1689
+ <data type="float"/>
1690
+ </attribute>
1691
+ <optional>
1692
+ <attribute name="y">
1693
+ <data type="float"/>
1694
+ </attribute>
1695
+ </optional>
1696
+ </element>
1697
+ </optional>
1698
+ </element>
1699
+ </zeroOrMore>
1700
+ </element>
1701
+ </define>
1702
+ <define name="svgmap">
1703
+ <element name="svgmap">
1704
+ <ref name="figure"/>
1705
+ <zeroOrMore>
1706
+ <element name="target">
1707
+ <attribute name="href">
1708
+ <data type="anyURI"/>
1709
+ </attribute>
1710
+ <choice>
1711
+ <ref name="xref"/>
1712
+ <ref name="hyperlink"/>
1713
+ <ref name="eref"/>
1714
+ </choice>
1715
+ </element>
1716
+ </zeroOrMore>
1717
+ </element>
1718
+ </define>
1719
+ <define name="ul_li">
1720
+ <element name="li">
1721
+ <optional>
1722
+ <attribute name="id">
1723
+ <data type="ID"/>
1724
+ </attribute>
1725
+ </optional>
1726
+ <optional>
1727
+ <attribute name="uncheckedcheckbox">
1728
+ <data type="boolean"/>
1729
+ </attribute>
1730
+ </optional>
1731
+ <optional>
1732
+ <attribute name="checkedcheckbox">
1733
+ <data type="boolean"/>
1734
+ </attribute>
1735
+ </optional>
1736
+ <oneOrMore>
1737
+ <ref name="BasicBlock"/>
1738
+ </oneOrMore>
1739
+ </element>
1740
+ </define>
1635
1741
  </grammar>