metanorma-csa 1.4.0

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.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/macos.yml +38 -0
  3. data/.github/workflows/ubuntu.yml +38 -0
  4. data/.github/workflows/windows.yml +41 -0
  5. data/.gitignore +8 -0
  6. data/.hound.yml +3 -0
  7. data/.rubocop.yml +10 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +11 -0
  10. data/LICENSE +25 -0
  11. data/README.adoc +83 -0
  12. data/Rakefile +6 -0
  13. data/bin/console +14 -0
  14. data/bin/rspec +18 -0
  15. data/bin/setup +8 -0
  16. data/lib/asciidoctor/csa.rb +5 -0
  17. data/lib/asciidoctor/csa/basicdoc.rng +1045 -0
  18. data/lib/asciidoctor/csa/biblio.rng +1142 -0
  19. data/lib/asciidoctor/csa/converter.rb +150 -0
  20. data/lib/asciidoctor/csa/csa.rng +101 -0
  21. data/lib/asciidoctor/csa/isodoc.rng +514 -0
  22. data/lib/asciidoctor/csa/isostandard.rng +860 -0
  23. data/lib/asciidoctor/csa/reqt.rng +171 -0
  24. data/lib/asciidoctor/csa/validate.rb +21 -0
  25. data/lib/isodoc/csa/base_convert.rb +43 -0
  26. data/lib/isodoc/csa/html/csa-logo-white.png +0 -0
  27. data/lib/isodoc/csa/html/csa.png +0 -0
  28. data/lib/isodoc/csa/html/csa.scss +700 -0
  29. data/lib/isodoc/csa/html/dots-w@2x.png +0 -0
  30. data/lib/isodoc/csa/html/dots@2x.png +0 -0
  31. data/lib/isodoc/csa/html/header.html +186 -0
  32. data/lib/isodoc/csa/html/html_csa_intro.html +8 -0
  33. data/lib/isodoc/csa/html/html_csa_titlepage.html +89 -0
  34. data/lib/isodoc/csa/html/htmlstyle.scss +1129 -0
  35. data/lib/isodoc/csa/html/scripts.html +74 -0
  36. data/lib/isodoc/csa/html/scripts.pdf.html +72 -0
  37. data/lib/isodoc/csa/html/word_csa_intro.html +33 -0
  38. data/lib/isodoc/csa/html/word_csa_titlepage.html +76 -0
  39. data/lib/isodoc/csa/html/wordstyle.scss +1136 -0
  40. data/lib/isodoc/csa/html_convert.rb +58 -0
  41. data/lib/isodoc/csa/metadata.rb +50 -0
  42. data/lib/isodoc/csa/pdf_convert.rb +63 -0
  43. data/lib/isodoc/csa/word_convert.rb +41 -0
  44. data/lib/metanorma-csa.rb +11 -0
  45. data/lib/metanorma/csa.rb +7 -0
  46. data/lib/metanorma/csa/processor.rb +46 -0
  47. data/lib/metanorma/csa/version.rb +7 -0
  48. data/metanorma-csa.gemspec +52 -0
  49. metadata +348 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0d65c8871019ef08de8360c7eacb92659f2cfcfa6c315931209ce0c615131e26
4
+ data.tar.gz: 04e571ded66798d8ff21ccacea4f105c0f101fdc9707467e8f3c679c7b0cc8e5
5
+ SHA512:
6
+ metadata.gz: a168302b27b05ed6c29894ad5ffd0db7c0874913af7167ded920a89405b0f4b44a36fa43ee73b6c00feaffd6cbc4cd3e458c4b60dfa48400b7453c9d2af7a2be
7
+ data.tar.gz: 0e8608dfac1f5e4ac4993154061455ba41909d560a62a6e6153c20fc5ba0fe5f3f2f165d5bd808a1bf6f466e36778c99e6ed8c5e850b900764791d2eea8832d6
@@ -0,0 +1,38 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: macos
4
+
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ test-macos:
9
+ name: Test on Ruby ${{ matrix.ruby }} macOS
10
+ runs-on: macos-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ '2.6', '2.5', '2.4' ]
15
+ steps:
16
+ - uses: actions/checkout@master
17
+ - name: Use Ruby
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ architecture: 'x64'
22
+ - name: Update gems
23
+ run: |
24
+ sudo gem install bundler --force
25
+ bundle install --jobs 4 --retry 3
26
+ - name: Use Node
27
+ uses: actions/setup-node@v1
28
+ with:
29
+ node-version: '8'
30
+ - name: Install Puppeteer
31
+ run: |
32
+ npm install -g puppeteer
33
+ - name: Install PlantUML
34
+ run: |
35
+ brew install plantuml
36
+ - name: Run specs
37
+ run: |
38
+ bundle exec rake
@@ -0,0 +1,38 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: ubuntu
4
+
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ test-linux:
9
+ name: Test on Ruby ${{ matrix.ruby }} Ubuntu
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ '2.6', '2.5', '2.4' ]
15
+ steps:
16
+ - uses: actions/checkout@master
17
+ - name: Use Ruby
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ architecture: 'x64'
22
+ - name: Update gems
23
+ run: |
24
+ gem install bundler
25
+ bundle install --jobs 4 --retry 3
26
+ - name: Use Node
27
+ uses: actions/setup-node@v1
28
+ with:
29
+ node-version: '8'
30
+ - name: Install Puppeteer
31
+ run: |
32
+ npm install -g puppeteer
33
+ - name: Install PlantUML
34
+ run: |
35
+ sudo bash -c "curl -L https://github.com/riboseinc/plantuml-install/raw/master/ubuntu.sh | bash"
36
+ - name: Run specs
37
+ run: |
38
+ bundle exec rake
@@ -0,0 +1,41 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: windows
4
+
5
+ on: [push, pull_request]
6
+
7
+ jobs:
8
+ test-windows:
9
+ name: Test on Ruby ${{ matrix.ruby }} Windows
10
+ runs-on: windows-latest
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [ '2.6', '2.5', '2.4' ]
15
+ steps:
16
+ - uses: actions/checkout@master
17
+ - name: Use Ruby
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: ${{ matrix.ruby }}
21
+ architecture: 'x64'
22
+ - name: Update gems
23
+ shell: pwsh
24
+ run: |
25
+ gem install bundler
26
+ bundle config --local path vendor/bundle
27
+ bundle update
28
+ bundle install --jobs 4 --retry 3
29
+ - name: Use Node
30
+ uses: actions/setup-node@v1
31
+ with:
32
+ node-version: '8'
33
+ - name: Install Puppeteer
34
+ run: |
35
+ npm install -g puppeteer
36
+ - name: Install PlantUML
37
+ run: |
38
+ cinst -y plantuml
39
+ - name: Run specs
40
+ run: |
41
+ bundle exec rake
@@ -0,0 +1,8 @@
1
+ .DS_Store
2
+ /coverage/
3
+
4
+ # rspec failure tracking
5
+ .rspec_status
6
+
7
+ # test data
8
+ /test.*
@@ -0,0 +1,3 @@
1
+ ruby:
2
+ Enabled: true
3
+ config_file: .rubocop.yml
@@ -0,0 +1,10 @@
1
+ # This project follows the Ribose OSS style guide.
2
+ # https://github.com/riboseinc/oss-guides
3
+ # All project-specific additions and overrides should be specified in this file.
4
+
5
+ inherit_from:
6
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
+ AllCops:
8
+ TargetRubyVersion: 2.3
9
+ Rails:
10
+ Enabled: true
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at ronald.tse@ribose.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ Encoding.default_external = Encoding::UTF_8
2
+ Encoding.default_internal = Encoding::UTF_8
3
+
4
+ source "https://rubygems.org"
5
+ git_source(:github) { |repo| "https://github.com/#{repo}" }
6
+
7
+ gemspec
8
+
9
+ if File.exist? 'Gemfile.devel'
10
+ eval File.read('Gemfile.devel'), nil, 'Gemfile.devel' # rubocop:disable Security/Eval
11
+ end
data/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ BSD 2-Clause License
2
+
3
+ Copyright (c) 2018, Ribose
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ * Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ * Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
20
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,83 @@
1
+ = AsciiCSAND: Asciidoctor processor for CSA Normal Documents (CSAND)
2
+
3
+ image:https://img.shields.io/gem/v/metanorma-csa.svg["Gem Version", link="https://rubygems.org/gems/metanorma-csa"]
4
+ image:https://github.com/metanorma/metanorma-csa/workflows/ubuntu/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-csa/actions?query=workflow%3Aubuntu"]
5
+ image:https://github.com/metanorma/metanorma-csa/workflows/macos/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-csa/actions?query=workflow%3Amacos"]
6
+ image:https://github.com/metanorma/metanorma-csa/workflows/windows/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-csa/actions?query=workflow%3Awindows"]
7
+ image:https://codeclimate.com/github/metanorma/metanorma-csand/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-csand"]
8
+ image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-csa.svg["Pull Requests", link="https://github.com/metanorma/metanorma-csa/pulls"]
9
+ image:https://img.shields.io/github/commits-since/metanorma/metanorma-csa/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-csa/releases"]
10
+
11
+ _Formerly known as_ `asciidoctor-csand`.
12
+
13
+ == Functionality
14
+
15
+ This gem processes http://asciidoctor.org/[Asciidoctor] documents following
16
+ a template for generating CSAND documents.
17
+
18
+ The gem currently inherits from the https://github.com/metanorma/metanorma-standoc
19
+ gem, and aligns closely to it. Refer to the ISO gem documentation
20
+ for guidance, including https://github.com/metanorma/metanorma-iso/wiki/Guidance-for-authoring
21
+
22
+ The following outputs are generated.
23
+
24
+ * (Optional) An HTML preview generated directly from the Asciidoctor document,
25
+ using native Asciidoctor formatting.
26
+ ** http://asciimath.org[AsciiMathML] is to be used for mathematical formatting.
27
+ The gem uses the https://github.com/asciidoctor/asciimath[Ruby AsciiMath parser],
28
+ which is syntactically stricter than the common MathJax processor;
29
+ if you do not get expected results, try bracketing terms your in AsciiMathML
30
+ expressions.
31
+ * an XML representation of the document, intended as a document model for CSAND
32
+ International Standards.
33
+ * The XML representation is processed in turn to generate the following outputs
34
+ as end deliverable CSAND standard drafts.
35
+ ** HTML output.
36
+
37
+ This AsciiDoc syntax for writing CSAND standards is hereby named "AsciiCSAND".
38
+
39
+ == Usage
40
+
41
+ The preferred way to invoke this gem is via the `metanorma` script:
42
+
43
+ [source,console]
44
+ ----
45
+ $ metanorma --type csa a.adoc # output just HTML
46
+ $ metanorma --type csa a.adoc --extensions html # output just HTML
47
+ $ metanorma --type csa a.adoc --extensions xml # output CSAND XML
48
+ ----
49
+
50
+ The gem translates the document into CSAND XML format, and then
51
+ validates its output against the CSAND XML document model; errors are
52
+ reported to console against the XML, and are intended for users to
53
+ check that they have provided all necessary components of the
54
+ document.
55
+
56
+ The gem then converts the XML to HTML, and
57
+ outputs that files with the appropriate `.html` suffix.
58
+
59
+ The gem can also be invoked directly within asciidoctor, though this is deprecated:
60
+
61
+ [source,console]
62
+ ----
63
+ $ asciidoctor -b csa -r 'metanorma-csa' a.adoc
64
+ ----
65
+
66
+ === Installation
67
+
68
+ If you are using a Mac, the https://github.com/metanorma/metanorma-macos-setup
69
+ repository has instructions on setting up your machine to run Metanorma
70
+ scripts such as this one. You need only run the following in a Terminal console:
71
+
72
+ [source,console]
73
+ ----
74
+ $ bash <(curl -s https://raw.githubusercontent.com/metanorma/metanorma-macos-setup/master/metanorma-setup)
75
+ $ gem install metanorma-csa
76
+
77
+ ----
78
+
79
+ == Documentation
80
+
81
+ See https://www.metanorma.com/author/csa/[Author Cloud Security Alliance documents with Metanorma-CSAND].
82
+
83
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'asciidoctor/csa'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start(__FILE__)
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require "pathname"
10
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path(
11
+ "../../Gemfile", Pathname.new(__FILE__).realpath
12
+ )
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rspec-core", "rspec")
18
+
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ module Asciidoctor
2
+ module Csa
3
+ # Your code goes here...
4
+ end
5
+ end
@@ -0,0 +1,1045 @@
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
+ <include href="biblio.rng">
4
+ <start>
5
+ <ref name="document"/>
6
+ </start>
7
+ </include>
8
+ <define name="document">
9
+ <element name="document">
10
+ <optional>
11
+ <attribute name="identifier"/>
12
+ </optional>
13
+ <ref name="bibdata"/>
14
+ <ref name="sections"/>
15
+ <zeroOrMore>
16
+ <ref name="references"/>
17
+ </zeroOrMore>
18
+ </element>
19
+ </define>
20
+ <define name="bibdata">
21
+ <element name="bibdata">
22
+ <ref name="BibData"/>
23
+ </element>
24
+ </define>
25
+ <define name="sections">
26
+ <element name="sections">
27
+ <oneOrMore>
28
+ <ref name="section"/>
29
+ </oneOrMore>
30
+ </element>
31
+ </define>
32
+ <define name="section">
33
+ <element name="section">
34
+ <ref name="Basic-Section"/>
35
+ <zeroOrMore>
36
+ <ref name="section"/>
37
+ </zeroOrMore>
38
+ </element>
39
+ </define>
40
+ <define name="Basic-Section">
41
+ <optional>
42
+ <attribute name="id">
43
+ <data type="ID"/>
44
+ </attribute>
45
+ </optional>
46
+ <optional>
47
+ <attribute name="language"/>
48
+ </optional>
49
+ <optional>
50
+ <attribute name="script"/>
51
+ </optional>
52
+ <optional>
53
+ <ref name="section-title"/>
54
+ </optional>
55
+ <zeroOrMore>
56
+ <ref name="BasicBlock"/>
57
+ </zeroOrMore>
58
+ <zeroOrMore>
59
+ <ref name="note"/>
60
+ </zeroOrMore>
61
+ </define>
62
+ <define name="references">
63
+ <element name="references">
64
+ <optional>
65
+ <attribute name="id">
66
+ <data type="ID"/>
67
+ </attribute>
68
+ </optional>
69
+ <optional>
70
+ <ref name="section-title"/>
71
+ </optional>
72
+ <zeroOrMore>
73
+ <ref name="BasicBlock"/>
74
+ </zeroOrMore>
75
+ <zeroOrMore>
76
+ <ref name="bibitem"/>
77
+ </zeroOrMore>
78
+ </element>
79
+ </define>
80
+ <define name="section-title">
81
+ <element name="title">
82
+ <zeroOrMore>
83
+ <ref name="TextElement"/>
84
+ </zeroOrMore>
85
+ </element>
86
+ </define>
87
+ <define name="BasicBlock">
88
+ <choice>
89
+ <ref name="paragraph-with-footnote"/>
90
+ <ref name="table"/>
91
+ <ref name="formula"/>
92
+ <ref name="admonition"/>
93
+ <ref name="ol"/>
94
+ <ref name="ul"/>
95
+ <ref name="dl"/>
96
+ <ref name="figure"/>
97
+ <ref name="quote"/>
98
+ <ref name="sourcecode"/>
99
+ <ref name="example"/>
100
+ <ref name="review"/>
101
+ <ref name="pre"/>
102
+ </choice>
103
+ </define>
104
+ <define name="paragraph">
105
+ <element name="p">
106
+ <ref name="ParagraphType"/>
107
+ </element>
108
+ </define>
109
+ <define name="Alignments">
110
+ <choice>
111
+ <value>left</value>
112
+ <value>right</value>
113
+ <value>center</value>
114
+ <value>justified</value>
115
+ </choice>
116
+ </define>
117
+ <define name="ParagraphType">
118
+ <attribute name="id">
119
+ <data type="ID"/>
120
+ </attribute>
121
+ <optional>
122
+ <attribute name="align">
123
+ <ref name="Alignments"/>
124
+ </attribute>
125
+ </optional>
126
+ <zeroOrMore>
127
+ <ref name="TextElement"/>
128
+ </zeroOrMore>
129
+ <zeroOrMore>
130
+ <ref name="note"/>
131
+ </zeroOrMore>
132
+ </define>
133
+ <define name="paragraph-with-footnote">
134
+ <element name="p">
135
+ <attribute name="id">
136
+ <data type="ID"/>
137
+ </attribute>
138
+ <optional>
139
+ <attribute name="align">
140
+ <ref name="Alignments"/>
141
+ </attribute>
142
+ </optional>
143
+ <zeroOrMore>
144
+ <choice>
145
+ <ref name="TextElement"/>
146
+ <ref name="fn"/>
147
+ </choice>
148
+ </zeroOrMore>
149
+ <zeroOrMore>
150
+ <ref name="note"/>
151
+ </zeroOrMore>
152
+ </element>
153
+ </define>
154
+ <define name="note">
155
+ <element name="note">
156
+ <attribute name="id">
157
+ <data type="ID"/>
158
+ </attribute>
159
+ <oneOrMore>
160
+ <ref name="paragraph"/>
161
+ </oneOrMore>
162
+ </element>
163
+ </define>
164
+ <define name="review">
165
+ <element name="review">
166
+ <attribute name="id">
167
+ <data type="ID"/>
168
+ </attribute>
169
+ <attribute name="reviewer"/>
170
+ <optional>
171
+ <attribute name="date">
172
+ <data type="dateTime"/>
173
+ </attribute>
174
+ </optional>
175
+ <attribute name="from">
176
+ <data type="IDREF"/>
177
+ </attribute>
178
+ <optional>
179
+ <attribute name="to">
180
+ <data type="IDREF"/>
181
+ </attribute>
182
+ </optional>
183
+ <oneOrMore>
184
+ <ref name="paragraph"/>
185
+ </oneOrMore>
186
+ </element>
187
+ </define>
188
+ <define name="formula">
189
+ <element name="formula">
190
+ <attribute name="id">
191
+ <data type="ID"/>
192
+ </attribute>
193
+ <optional>
194
+ <attribute name="unnumbered">
195
+ <data type="boolean"/>
196
+ </attribute>
197
+ </optional>
198
+ <optional>
199
+ <attribute name="subsequence"/>
200
+ </optional>
201
+ <optional>
202
+ <attribute name="inequality">
203
+ <data type="boolean"/>
204
+ </attribute>
205
+ </optional>
206
+ <ref name="stem"/>
207
+ <optional>
208
+ <ref name="dl"/>
209
+ </optional>
210
+ <zeroOrMore>
211
+ <ref name="note"/>
212
+ </zeroOrMore>
213
+ </element>
214
+ </define>
215
+ <define name="quote">
216
+ <element name="quote">
217
+ <attribute name="id">
218
+ <data type="ID"/>
219
+ </attribute>
220
+ <optional>
221
+ <attribute name="alignment">
222
+ <ref name="Alignments"/>
223
+ </attribute>
224
+ </optional>
225
+ <optional>
226
+ <ref name="quote-source"/>
227
+ </optional>
228
+ <optional>
229
+ <ref name="quote-author"/>
230
+ </optional>
231
+ <oneOrMore>
232
+ <ref name="paragraph-with-footnote"/>
233
+ </oneOrMore>
234
+ <zeroOrMore>
235
+ <ref name="note"/>
236
+ </zeroOrMore>
237
+ </element>
238
+ </define>
239
+ <define name="quote-source">
240
+ <element name="source">
241
+ <ref name="erefType"/>
242
+ </element>
243
+ </define>
244
+ <define name="quote-author">
245
+ <element name="author">
246
+ <text/>
247
+ </element>
248
+ </define>
249
+ <define name="sourcecode">
250
+ <element name="sourcecode">
251
+ <attribute name="id">
252
+ <data type="ID"/>
253
+ </attribute>
254
+ <optional>
255
+ <attribute name="unnumbered">
256
+ <data type="boolean"/>
257
+ </attribute>
258
+ </optional>
259
+ <optional>
260
+ <attribute name="subsequence"/>
261
+ </optional>
262
+ <optional>
263
+ <attribute name="lang"/>
264
+ </optional>
265
+ <optional>
266
+ <ref name="tname"/>
267
+ </optional>
268
+ <oneOrMore>
269
+ <choice>
270
+ <text/>
271
+ <ref name="callout"/>
272
+ </choice>
273
+ </oneOrMore>
274
+ <zeroOrMore>
275
+ <ref name="annotation"/>
276
+ </zeroOrMore>
277
+ <zeroOrMore>
278
+ <ref name="note"/>
279
+ </zeroOrMore>
280
+ </element>
281
+ </define>
282
+ <define name="pre">
283
+ <element name="pre">
284
+ <attribute name="id">
285
+ <data type="ID"/>
286
+ </attribute>
287
+ <optional>
288
+ <attribute name="alt"/>
289
+ </optional>
290
+ <optional>
291
+ <ref name="tname"/>
292
+ </optional>
293
+ <text/>
294
+ <zeroOrMore>
295
+ <ref name="note"/>
296
+ </zeroOrMore>
297
+ </element>
298
+ </define>
299
+ <define name="table">
300
+ <element name="table">
301
+ <attribute name="id">
302
+ <data type="ID"/>
303
+ </attribute>
304
+ <optional>
305
+ <attribute name="unnumbered">
306
+ <data type="boolean"/>
307
+ </attribute>
308
+ </optional>
309
+ <optional>
310
+ <attribute name="subsequence"/>
311
+ </optional>
312
+ <optional>
313
+ <attribute name="alt"/>
314
+ </optional>
315
+ <optional>
316
+ <attribute name="summary"/>
317
+ </optional>
318
+ <optional>
319
+ <attribute name="uri">
320
+ <data type="anyURI"/>
321
+ </attribute>
322
+ </optional>
323
+ <optional>
324
+ <ref name="tname"/>
325
+ </optional>
326
+ <optional>
327
+ <ref name="thead"/>
328
+ </optional>
329
+ <ref name="tbody"/>
330
+ <optional>
331
+ <ref name="tfoot"/>
332
+ </optional>
333
+ <zeroOrMore>
334
+ <ref name="table-note"/>
335
+ </zeroOrMore>
336
+ <optional>
337
+ <ref name="dl"/>
338
+ </optional>
339
+ </element>
340
+ </define>
341
+ <define name="tname">
342
+ <element name="name">
343
+ <oneOrMore>
344
+ <ref name="PureTextElement"/>
345
+ </oneOrMore>
346
+ </element>
347
+ </define>
348
+ <define name="thead">
349
+ <element name="thead">
350
+ <ref name="tr"/>
351
+ </element>
352
+ </define>
353
+ <define name="tfoot">
354
+ <element name="tfoot">
355
+ <ref name="tr"/>
356
+ </element>
357
+ </define>
358
+ <define name="tbody">
359
+ <element name="tbody">
360
+ <oneOrMore>
361
+ <ref name="tr"/>
362
+ </oneOrMore>
363
+ </element>
364
+ </define>
365
+ <define name="table-note">
366
+ <element name="note">
367
+ <ref name="paragraph"/>
368
+ </element>
369
+ </define>
370
+ <define name="tr">
371
+ <element name="tr">
372
+ <oneOrMore>
373
+ <choice>
374
+ <ref name="td"/>
375
+ <ref name="th"/>
376
+ </choice>
377
+ </oneOrMore>
378
+ </element>
379
+ </define>
380
+ <define name="td">
381
+ <element name="td">
382
+ <optional>
383
+ <attribute name="colspan"/>
384
+ </optional>
385
+ <optional>
386
+ <attribute name="rowspan"/>
387
+ </optional>
388
+ <optional>
389
+ <attribute name="align">
390
+ <choice>
391
+ <value>left</value>
392
+ <value>right</value>
393
+ <value>center</value>
394
+ </choice>
395
+ </attribute>
396
+ </optional>
397
+ <choice>
398
+ <zeroOrMore>
399
+ <ref name="TextElement"/>
400
+ </zeroOrMore>
401
+ <oneOrMore>
402
+ <ref name="paragraph-with-footnote"/>
403
+ </oneOrMore>
404
+ </choice>
405
+ </element>
406
+ </define>
407
+ <define name="th">
408
+ <element name="th">
409
+ <optional>
410
+ <attribute name="colspan"/>
411
+ </optional>
412
+ <optional>
413
+ <attribute name="rowspan"/>
414
+ </optional>
415
+ <optional>
416
+ <attribute name="align">
417
+ <choice>
418
+ <value>left</value>
419
+ <value>right</value>
420
+ <value>center</value>
421
+ </choice>
422
+ </attribute>
423
+ </optional>
424
+ <choice>
425
+ <zeroOrMore>
426
+ <ref name="TextElement"/>
427
+ </zeroOrMore>
428
+ <oneOrMore>
429
+ <ref name="paragraph-with-footnote"/>
430
+ </oneOrMore>
431
+ </choice>
432
+ </element>
433
+ </define>
434
+ <define name="example">
435
+ <element name="example">
436
+ <attribute name="id">
437
+ <data type="ID"/>
438
+ </attribute>
439
+ <optional>
440
+ <attribute name="unnumbered">
441
+ <data type="boolean"/>
442
+ </attribute>
443
+ </optional>
444
+ <optional>
445
+ <attribute name="subsequence"/>
446
+ </optional>
447
+ <optional>
448
+ <ref name="tname"/>
449
+ </optional>
450
+ <oneOrMore>
451
+ <choice>
452
+ <ref name="formula"/>
453
+ <ref name="ul"/>
454
+ <ref name="ol"/>
455
+ <ref name="dl"/>
456
+ <ref name="quote"/>
457
+ <ref name="sourcecode"/>
458
+ <ref name="paragraph-with-footnote"/>
459
+ </choice>
460
+ </oneOrMore>
461
+ <zeroOrMore>
462
+ <ref name="note"/>
463
+ </zeroOrMore>
464
+ </element>
465
+ </define>
466
+ <define name="admonition">
467
+ <element name="admonition">
468
+ <attribute name="type">
469
+ <ref name="AdmonitionType"/>
470
+ </attribute>
471
+ <optional>
472
+ <attribute name="class"/>
473
+ </optional>
474
+ <attribute name="id">
475
+ <data type="ID"/>
476
+ </attribute>
477
+ <optional>
478
+ <attribute name="uri">
479
+ <data type="anyURI"/>
480
+ </attribute>
481
+ </optional>
482
+ <optional>
483
+ <ref name="tname"/>
484
+ </optional>
485
+ <zeroOrMore>
486
+ <ref name="paragraph-with-footnote"/>
487
+ </zeroOrMore>
488
+ <zeroOrMore>
489
+ <ref name="note"/>
490
+ </zeroOrMore>
491
+ </element>
492
+ </define>
493
+ <define name="AdmonitionType">
494
+ <choice>
495
+ <value>warning</value>
496
+ <value>note</value>
497
+ <value>tip</value>
498
+ <value>important</value>
499
+ <value>caution</value>
500
+ <value>statement</value>
501
+ </choice>
502
+ </define>
503
+ <define name="figure">
504
+ <element name="figure">
505
+ <attribute name="id">
506
+ <data type="ID"/>
507
+ </attribute>
508
+ <optional>
509
+ <attribute name="unnumbered">
510
+ <data type="boolean"/>
511
+ </attribute>
512
+ </optional>
513
+ <optional>
514
+ <attribute name="subsequence"/>
515
+ </optional>
516
+ <optional>
517
+ <attribute name="class"/>
518
+ </optional>
519
+ <optional>
520
+ <ref name="source"/>
521
+ </optional>
522
+ <optional>
523
+ <ref name="tname"/>
524
+ </optional>
525
+ <choice>
526
+ <ref name="image"/>
527
+ <ref name="video"/>
528
+ <ref name="audio"/>
529
+ <ref name="pre"/>
530
+ <oneOrMore>
531
+ <ref name="paragraph-with-footnote"/>
532
+ </oneOrMore>
533
+ <zeroOrMore>
534
+ <ref name="figure"/>
535
+ </zeroOrMore>
536
+ </choice>
537
+ <zeroOrMore>
538
+ <ref name="fn"/>
539
+ </zeroOrMore>
540
+ <optional>
541
+ <ref name="dl"/>
542
+ </optional>
543
+ <zeroOrMore>
544
+ <ref name="note"/>
545
+ </zeroOrMore>
546
+ </element>
547
+ </define>
548
+ <define name="TextElement">
549
+ <choice>
550
+ <text/>
551
+ <ref name="em"/>
552
+ <ref name="eref"/>
553
+ <ref name="strong"/>
554
+ <ref name="stem"/>
555
+ <ref name="sub"/>
556
+ <ref name="sup"/>
557
+ <ref name="tt"/>
558
+ <ref name="underline"/>
559
+ <ref name="keyword"/>
560
+ <ref name="ruby"/>
561
+ <ref name="strike"/>
562
+ <ref name="smallcap"/>
563
+ <ref name="xref"/>
564
+ <ref name="br"/>
565
+ <ref name="hyperlink"/>
566
+ <ref name="hr"/>
567
+ <ref name="pagebreak"/>
568
+ <ref name="bookmark"/>
569
+ <ref name="image"/>
570
+ <ref name="index"/>
571
+ </choice>
572
+ </define>
573
+ <define name="PureTextElement">
574
+ <choice>
575
+ <text/>
576
+ <ref name="em"/>
577
+ <ref name="strong"/>
578
+ <ref name="sub"/>
579
+ <ref name="sup"/>
580
+ <ref name="tt"/>
581
+ <ref name="underline"/>
582
+ <ref name="strike"/>
583
+ <ref name="smallcap"/>
584
+ <ref name="br"/>
585
+ </choice>
586
+ </define>
587
+ <define name="source">
588
+ <element name="source">
589
+ <ref name="TypedUri"/>
590
+ </element>
591
+ </define>
592
+ <define name="em">
593
+ <element name="em">
594
+ <zeroOrMore>
595
+ <ref name="PureTextElement"/>
596
+ </zeroOrMore>
597
+ </element>
598
+ </define>
599
+ <define name="strong">
600
+ <element name="strong">
601
+ <zeroOrMore>
602
+ <ref name="PureTextElement"/>
603
+ </zeroOrMore>
604
+ </element>
605
+ </define>
606
+ <define name="tt">
607
+ <element name="tt">
608
+ <zeroOrMore>
609
+ <ref name="PureTextElement"/>
610
+ </zeroOrMore>
611
+ </element>
612
+ </define>
613
+ <define name="keyword">
614
+ <element name="keyword">
615
+ <zeroOrMore>
616
+ <ref name="PureTextElement"/>
617
+ </zeroOrMore>
618
+ </element>
619
+ </define>
620
+ <define name="sub">
621
+ <element name="sub">
622
+ <zeroOrMore>
623
+ <ref name="PureTextElement"/>
624
+ </zeroOrMore>
625
+ </element>
626
+ </define>
627
+ <define name="sup">
628
+ <element name="sup">
629
+ <zeroOrMore>
630
+ <ref name="PureTextElement"/>
631
+ </zeroOrMore>
632
+ </element>
633
+ </define>
634
+ <define name="strike">
635
+ <element name="strike">
636
+ <zeroOrMore>
637
+ <ref name="PureTextElement"/>
638
+ </zeroOrMore>
639
+ </element>
640
+ </define>
641
+ <define name="underline">
642
+ <element name="underline">
643
+ <zeroOrMore>
644
+ <ref name="PureTextElement"/>
645
+ </zeroOrMore>
646
+ </element>
647
+ </define>
648
+ <define name="smallcap">
649
+ <element name="smallcap">
650
+ <zeroOrMore>
651
+ <ref name="PureTextElement"/>
652
+ </zeroOrMore>
653
+ </element>
654
+ </define>
655
+ <define name="ruby">
656
+ <element name="ruby">
657
+ <zeroOrMore>
658
+ <choice>
659
+ <ref name="PureTextElement"/>
660
+ <ref name="rp"/>
661
+ <ref name="rt"/>
662
+ </choice>
663
+ </zeroOrMore>
664
+ </element>
665
+ </define>
666
+ <define name="rp">
667
+ <element name="rp">
668
+ <zeroOrMore>
669
+ <ref name="PureTextElement"/>
670
+ </zeroOrMore>
671
+ </element>
672
+ </define>
673
+ <define name="rt">
674
+ <element name="rt">
675
+ <zeroOrMore>
676
+ <ref name="PureTextElement"/>
677
+ </zeroOrMore>
678
+ </element>
679
+ </define>
680
+ <define name="br">
681
+ <element name="br">
682
+ <empty/>
683
+ </element>
684
+ </define>
685
+ <define name="hr">
686
+ <element name="hr">
687
+ <empty/>
688
+ </element>
689
+ </define>
690
+ <define name="pagebreak">
691
+ <element name="pagebreak">
692
+ <empty/>
693
+ </element>
694
+ </define>
695
+ <define name="index">
696
+ <element name="index">
697
+ <attribute name="primary"/>
698
+ <optional>
699
+ <attribute name="secondary"/>
700
+ </optional>
701
+ <optional>
702
+ <attribute name="tertiary"/>
703
+ </optional>
704
+ </element>
705
+ </define>
706
+ <!-- bare ID element, used for referencing arbitrary spans of text -->
707
+ <define name="bookmark">
708
+ <element name="bookmark">
709
+ <attribute name="id">
710
+ <data type="ID"/>
711
+ </attribute>
712
+ <empty/>
713
+ </element>
714
+ </define>
715
+ <define name="ReferenceFormat">
716
+ <choice>
717
+ <value>external</value>
718
+ <value>inline</value>
719
+ <value>footnote</value>
720
+ <value>callout</value>
721
+ </choice>
722
+ </define>
723
+ <define name="eref">
724
+ <element name="eref">
725
+ <ref name="erefType"/>
726
+ </element>
727
+ </define>
728
+ <define name="erefType">
729
+ <optional>
730
+ <attribute name="normative">
731
+ <data type="boolean"/>
732
+ </attribute>
733
+ </optional>
734
+ <attribute name="citeas"/>
735
+ <attribute name="type">
736
+ <ref name="ReferenceFormat"/>
737
+ </attribute>
738
+ <optional>
739
+ <attribute name="alt"/>
740
+ </optional>
741
+ <ref name="CitationType"/>
742
+ <text/>
743
+ </define>
744
+ <define name="hyperlink">
745
+ <element name="link">
746
+ <attribute name="target">
747
+ <data type="anyURI"/>
748
+ </attribute>
749
+ <attribute name="type">
750
+ <ref name="ReferenceFormat"/>
751
+ </attribute>
752
+ <optional>
753
+ <attribute name="alt"/>
754
+ </optional>
755
+ <text/>
756
+ </element>
757
+ </define>
758
+ <define name="xref">
759
+ <element name="xref">
760
+ <attribute name="target">
761
+ <data type="IDREF"/>
762
+ </attribute>
763
+ <attribute name="type">
764
+ <ref name="ReferenceFormat"/>
765
+ </attribute>
766
+ <optional>
767
+ <attribute name="alt"/>
768
+ </optional>
769
+ <text/>
770
+ </element>
771
+ </define>
772
+ <define name="fn">
773
+ <element name="fn">
774
+ <attribute name="reference"/>
775
+ <oneOrMore>
776
+ <ref name="paragraph"/>
777
+ </oneOrMore>
778
+ </element>
779
+ </define>
780
+ <!--
781
+ This is xref with fixed @type="footnote", and @target built in as paragraph+
782
+ @reference replaces ReferenceElement/text
783
+ so <fn reference="2"><p>This is a footnote</p></fn>
784
+ corresponds to
785
+ <eref type="footnote" target="fn2">2</xref> <p id="fn2">This is a footnote</p>
786
+ -->
787
+ <define name="callout">
788
+ <element name="callout">
789
+ <attribute name="target">
790
+ <data type="IDREF"/>
791
+ </attribute>
792
+ <text/>
793
+ </element>
794
+ </define>
795
+ <!--
796
+ This is xref with fixed @type="callout"; the target by convention is in an annotation in the same source code snippet
797
+ so <callout target="xyz">1</callout>
798
+ corresponds to <xref type="callout" target="xyz">1</xref>
799
+ -->
800
+ <define name="image">
801
+ <element name="image">
802
+ <attribute name="id">
803
+ <data type="ID"/>
804
+ </attribute>
805
+ <attribute name="src">
806
+ <data type="anyURI"/>
807
+ </attribute>
808
+ <attribute name="mimetype"/>
809
+ <optional>
810
+ <attribute name="filename"/>
811
+ </optional>
812
+ <optional>
813
+ <attribute name="width">
814
+ <choice>
815
+ <data type="int"/>
816
+ <value>auto</value>
817
+ </choice>
818
+ </attribute>
819
+ </optional>
820
+ <optional>
821
+ <attribute name="height">
822
+ <choice>
823
+ <data type="int"/>
824
+ <value>auto</value>
825
+ </choice>
826
+ </attribute>
827
+ </optional>
828
+ <optional>
829
+ <attribute name="alt"/>
830
+ </optional>
831
+ <optional>
832
+ <attribute name="title"/>
833
+ </optional>
834
+ <optional>
835
+ <attribute name="longdesc">
836
+ <data type="anyURI"/>
837
+ </attribute>
838
+ </optional>
839
+ </element>
840
+ </define>
841
+ <define name="video">
842
+ <element name="video">
843
+ <attribute name="id">
844
+ <data type="ID"/>
845
+ </attribute>
846
+ <attribute name="src">
847
+ <data type="anyURI"/>
848
+ </attribute>
849
+ <attribute name="mimetype"/>
850
+ <optional>
851
+ <attribute name="filename"/>
852
+ </optional>
853
+ <optional>
854
+ <attribute name="width">
855
+ <choice>
856
+ <data type="int"/>
857
+ <value>auto</value>
858
+ </choice>
859
+ </attribute>
860
+ </optional>
861
+ <optional>
862
+ <attribute name="height">
863
+ <choice>
864
+ <data type="int"/>
865
+ <value>auto</value>
866
+ </choice>
867
+ </attribute>
868
+ </optional>
869
+ <optional>
870
+ <attribute name="alt"/>
871
+ </optional>
872
+ <optional>
873
+ <attribute name="title"/>
874
+ </optional>
875
+ <optional>
876
+ <attribute name="longdesc">
877
+ <data type="anyURI"/>
878
+ </attribute>
879
+ </optional>
880
+ <zeroOrMore>
881
+ <ref name="altsource"/>
882
+ </zeroOrMore>
883
+ </element>
884
+ </define>
885
+ <define name="audio">
886
+ <element name="audio">
887
+ <attribute name="id">
888
+ <data type="ID"/>
889
+ </attribute>
890
+ <attribute name="src">
891
+ <data type="anyURI"/>
892
+ </attribute>
893
+ <attribute name="mimetype"/>
894
+ <optional>
895
+ <attribute name="filename"/>
896
+ </optional>
897
+ <optional>
898
+ <attribute name="alt"/>
899
+ </optional>
900
+ <optional>
901
+ <attribute name="title"/>
902
+ </optional>
903
+ <optional>
904
+ <attribute name="longdesc">
905
+ <data type="anyURI"/>
906
+ </attribute>
907
+ </optional>
908
+ <zeroOrMore>
909
+ <ref name="altsource"/>
910
+ </zeroOrMore>
911
+ </element>
912
+ </define>
913
+ <define name="altsource">
914
+ <element name="altsource">
915
+ <attribute name="src">
916
+ <data type="anyURI"/>
917
+ </attribute>
918
+ <attribute name="mimetype"/>
919
+ <optional>
920
+ <attribute name="filename"/>
921
+ </optional>
922
+ </element>
923
+ </define>
924
+ <define name="stem">
925
+ <element name="stem">
926
+ <attribute name="type">
927
+ <choice>
928
+ <value>MathML</value>
929
+ <value>AsciiMath</value>
930
+ </choice>
931
+ </attribute>
932
+ <oneOrMore>
933
+ <choice>
934
+ <text/>
935
+ <ref name="AnyElement"/>
936
+ </choice>
937
+ </oneOrMore>
938
+ </element>
939
+ </define>
940
+ <define name="annotation">
941
+ <element name="annotation">
942
+ <attribute name="id">
943
+ <data type="ID"/>
944
+ </attribute>
945
+ <ref name="paragraph"/>
946
+ </element>
947
+ </define>
948
+ <define name="ul">
949
+ <element name="ul">
950
+ <attribute name="id">
951
+ <data type="ID"/>
952
+ </attribute>
953
+ <oneOrMore>
954
+ <ref name="li"/>
955
+ </oneOrMore>
956
+ <zeroOrMore>
957
+ <ref name="note"/>
958
+ </zeroOrMore>
959
+ </element>
960
+ </define>
961
+ <define name="li">
962
+ <element name="li">
963
+ <optional>
964
+ <attribute name="id">
965
+ <data type="ID"/>
966
+ </attribute>
967
+ </optional>
968
+ <oneOrMore>
969
+ <ref name="paragraph-with-footnote"/>
970
+ </oneOrMore>
971
+ </element>
972
+ </define>
973
+ <define name="ol">
974
+ <element name="ol">
975
+ <attribute name="id">
976
+ <data type="ID"/>
977
+ </attribute>
978
+ <attribute name="type">
979
+ <choice>
980
+ <value>roman</value>
981
+ <value>alphabet</value>
982
+ <value>arabic</value>
983
+ <value>roman_upper</value>
984
+ <value>alphabet_upper</value>
985
+ </choice>
986
+ </attribute>
987
+ <oneOrMore>
988
+ <ref name="li"/>
989
+ </oneOrMore>
990
+ <zeroOrMore>
991
+ <ref name="note"/>
992
+ </zeroOrMore>
993
+ </element>
994
+ </define>
995
+ <define name="dl">
996
+ <element name="dl">
997
+ <attribute name="id">
998
+ <data type="ID"/>
999
+ </attribute>
1000
+ <oneOrMore>
1001
+ <ref name="dt"/>
1002
+ <ref name="dd"/>
1003
+ </oneOrMore>
1004
+ <zeroOrMore>
1005
+ <ref name="note"/>
1006
+ </zeroOrMore>
1007
+ </element>
1008
+ </define>
1009
+ <define name="dt">
1010
+ <element name="dt">
1011
+ <zeroOrMore>
1012
+ <ref name="TextElement"/>
1013
+ </zeroOrMore>
1014
+ </element>
1015
+ </define>
1016
+ <define name="dd">
1017
+ <element name="dd">
1018
+ <zeroOrMore>
1019
+ <ref name="paragraph-with-footnote"/>
1020
+ </zeroOrMore>
1021
+ </element>
1022
+ </define>
1023
+ <define name="ext">
1024
+ <element name="ext">
1025
+ <ref name="BibDataExtensionType"/>
1026
+ </element>
1027
+ </define>
1028
+ <define name="BibDataExtensionType">
1029
+ <ref name="doctype"/>
1030
+ </define>
1031
+ <define name="doctype">
1032
+ <element name="doctype">
1033
+ <ref name="DocumentType"/>
1034
+ </element>
1035
+ </define>
1036
+ <define name="DocumentType">
1037
+ <value>document</value>
1038
+ </define>
1039
+ <define name="BibData">
1040
+ <ref name="BibliographicItem"/>
1041
+ <optional>
1042
+ <ref name="ext"/>
1043
+ </optional>
1044
+ </define>
1045
+ </grammar>