Newer
Older
XML / quick-reference.markdown
# XML authoring framework quick reference

## Conventions

* All items and elements are listed in alphabetical order. Attributes are listed in alphabetical order with required attributes first. When there are multiple elements for the same item, there is no preference for any particular element over another, as long as the resulting markup is well-formed.
* Typical EBNF-style notation applies: `[ ]` indicates optional, `|` indicates alternation, `{ }` indicates repetition, etc.
* **bold** indicates a default value.

## Basic formatting

### Page elements (`basic-page-elements.xml`)

| Item              | Element(s)        | Attributes                                            | Notes
| ----              | ----------        | ----------                                            | -----
| horizontal rule   | `horizontal-rule` |                                                       |
|                   | `hr`              |                                                       |
|                   | `hrule`           |                                                       |
| horizontal skip   | `horizontal-skip` | `size=fill|`*`<LaTeX length>`*                        | HTML: no effect
|                   | `hskip`           |                                                       |
| forced line break | `br`              |                                                       |
|                   | `line-break`      |                                                       |
|                   | `newline`         |                                                       |
| no page break     | `mbox`            |                                                       |
|                   | `no-break`        |                                                       |
| page break        | `new-page`        | `[caption-text=`*`<string>`*`]`                       | “**`continues over…`**”
|                   | `newpage`         | `[print-caption=`**`no`**`|yes]`                      |
|                   | `page-break`      |                                                       |
|                   | `pagebreak`       |                                                       |
| paragraph         | `P`               | `[align=center|left|right]`                           |
|                   | `p`               | `[border=`**`no`**`|yes]`                             |
|                   | `para`            | `[indent=no|`**`yes`**`]`                             |
|                   | `paragraph`       |                                                       |
| vertical skip     | `vertical-skip`   | `[size=fill|large|medium|small|`*`<LaTeX length>`*`]` | **inserts a paragraph skip**
|                   | `vskip`           |                                                       |

### Text formatting and layout (`basic-text-formatting.xml`)

| Item              | Element(s)        | Attributes    | Notes
| ----              | ----------        | ----------    | -----
| bold face         | `bold`            |               |
| center            | `center`          |               |
|                   | `centering`       |               |
|                   | `centre`          |               |
|                   | `centring`        |               |
| emphasis          | `em`              |               |
|                   | `emph`            |               |
| foreign word      | `foreign`         |               |
| italics           | `italic`          |               |
| strikethrough     | `line-through`    |               |
|                   | `linethrough`     |               |
|                   | `strike-through`  |               |
|                   | `strikethrough`   |               |
| strong emphasis   | `strong`          |               |
| term              | `term`            |               |
| underline         | `u`               |               |
|                   | `underline`       |               |

### Number formatting (`number-formatting.xml`)

| Item              | Element(s)    | Attributes    | Notes
| ----              | ----------    | ----------    | -----
| formatted number  | `number`      |               |

### Font size and style (`fonts.xml`)

| Item                  | Element(s)        | Attributes                            | Notes
| ----                  | ----------        | ----------                            | -----
| monospaced type       | `monospace`       |                                       |
|                       | `tt`              |                                       |
|                       | `typewriter`      |                                       |
| sans-serif type       | `sans`            |                                       |
|                       | `sans-serif`      |                                       |
|                       | `sf`              |                                       |
|                       | `ss`              |                                       |
| font family           | `font`            | `[fontspec-options=`*`<string>`*`]`   | XeLaTeX: `fontspec` package options
|                       | `typeface`        | `[html=`*`<name>`*`]`                 | HTML: CSS font name(s)
|                       |                   | `[latex=`*`<name>`*`]`                | LaTeX: LaTeX font name
|                       |                   | `[xelatex=`*`<name>`*`]`              | XeLaTeX: `fontspec` font name
| “tiny” font size      | `tiny`            |                                       | HTML: `<smaller>` × 4
|                       |                   |                                       | LaTeX: `\tiny`
| “script” font size    | `scriptsize`      |                                       | HTML: `<smaller>` × 3
|                       |                   |                                       | LaTeX: `\scriptsize`
| “footnote” font size  | `footnotesize`    |                                       | HTML: `<smaller>` × 2
|                       |                   |                                       | LaTeX: `\footnotesize`
| “small” font size     | `small`           |                                       | HTML: `<smaller>`
|                       |                   |                                       | LaTeX: `\small`
| “large” font size     | `large`           |                                       | HTML: `<larger>`
|                       |                   |                                       | LaTeX: `\large`
| “Large” font size     | `Large`           |                                       | HTML: `<larger>` × 2
|                       |                   |                                       | LaTeX: `\Large`
| “LARGE” font size     | `LARGE`           |                                       | HTML: `<larger>` × 3
|                       |                   |                                       | LaTeX: `\LARGE`
| “huge” font size      | `huge`            |                                       | HTML: `<larger>` × 4
|                       |                   |                                       | LaTeX: `\huge`
| “Huge” font size      | `Huge`            |                                       | HTML: `<larger>` × 5
|                       |                   |                                       | LaTeX: `\Huge`
| superscript           | `superscript`     |                                       |
| subscript             | `subscript`       |                                       |

### Inline code and code blocks (`code-formatting.xml`)

| Item              | Element(s)        | Attributes                        | Notes
| ----              | ----------        | ----------                        | -----
| code (block)      | `code-block`      | `[allow-breaks=no|`**`yes`**`]`   | `code-block` requires `<![CDATA[ … ]]>`
|                   |                   | `[language=`*`<name>`*`]`         | LaTeX: `listings` language name
| code (inline)     | `code`            | `[language=`*`<name>`*`]`         | LaTeX: `listings` language name
| verbatim (block)  | `verbatim`        |                                   |
|                   | `verbatim-block`  |                                   |
| verbatim (inline) | `inline-verbatim` |                                   |
|                   | `verb`            |                                   |

### Miscellaneous symbols (`miscellaneous-symbols.xml`)

| Item              | Element(s)                    | Attributes    | Notes
| ----              | ----------                    | ----------    | -----
| #                 | `hash`                        |               | U+0023 NUMBER SIGN
|                   | `number-sign`                 |               |
|                   | `sharp`                       |               |
| $                 | `dollar`                      |               | U+0024 DOLLAR SIGN
|                   | `dollar-sign`                 |               |
| %                 | `percent`                     |               | U+0025 PERCENT SIGN
|                   | `percent-sign`                |               |
|                   | `percentage-sign`             |               |
| &                 | `ampersand`                   |               | U+0026 AMPERSAND
| \                 | `backslash`                   |               | U+005C REVERSE SOLIDUS
| _                 | `low-line`                    |               | U+005F LOW LINE
|                   | `underscore`                  |               |
| {                 | `left-brace`                  |               | U+007B LEFT CURLY BRACKET
|                   | `left-curly-brace`            |               |
|                   | `left-curly-bracket`          |               |
| }                 | `right-brace`                 |               | U+007D RIGHT CURLY BRACKET
|                   | `right-curly-brace`           |               |
|                   | `right-curly-bracket`         |               |
| °                 | `degree-sign`                 |               | U+00B0 DEGREE SIGN
|                   | `degrees`                     |               |
| §                 | `section-sign`                |               | U+00A7 SECTION SIGN
| ©                 | `copyright-sign`              |               | U+00A9 COPYRIGHT SIGN
| ¶                 | `paragraph-sign`              |               | U+00B6 PILCROW SIGN
|                   | `pilcrow`                     |               |
|                   | `pilcrow-sign`                |               |
| ‒ (number dash)   | `figure-dash`                 |               | U+2012 FIGURE DASH
|                   | `number-dash`                 |               |
| – (en dash)       | `en-dash`                     |               | U+2013 EN DASH
|                   | `endash`                      |               |
|                   | `n-dash`                      |               |
|                   | `ndash`                       |               |
| — (em dash)       | `em-dash`                     |               | U+2014 EM DASH
|                   | `emdash`                      |               |
|                   | `m-dash`                      |               |
|                   | `mdash`                       |               |
| ’                 | `apostrophe`                  |               | U+2019 RIGHT SINGLE QUOTATION MARK
|                   | `right-single-quotation-mark` |               |
| †                 | `dag`                         |               | U+2020 DAGGER
|                   | `dagger`                      |               |
| ‡                 | `ddag`                        |               | U+2021 DOUBLE DAGGER
|                   | `ddagger`                     |               |
|                   | `double-dagger`               |               |
| …                 | `dots`                        |               | U+2026 HORIZONTAL ELLIPSIS
|                   | `ellipsis`                    |               |
|                   | `ellipsis-sign`               |               |
|                   | `etc`                         |               |
|                   | `horizontal-ellipsis`         |               |
| ™                 | `tm`                          |               | U+2122 TRADE MARK SIGN
|                   | `trade-mark-sign`             |               |
|                   | `trademark`                   |               |
|                   | `trademark-sign`              |               |
| LaTeX logo        | `LaTeX`                       |               |
|                   | `latex`                       |               |

### Special characters (`special-characters.xml`)

| Item                  | Element(s)            | Attributes                        | Notes
| ----                  | ----------            | ----------                        | -----
| discretionary hyphen  | `hyphen`              |                                   |
| forced space          | `space`               |                                   | U+0020 SPACE
| non-breaking space    | `nbsp`                |                                   |
|                       | `no-break-space`      |                                   |
|                       | `non-breaking-space`  |                                   |
| thin space            | `thin-space`          |                                   |
|                       | `thinspace`           |                                   |

## Document structure

### Sections (`sectioning.xml`)

| Item          | Element(s)    | Attributes            | Notes
| ----          | ----------    | ----------            | -----
| section       | `section`     | `label=`*`<string>`*  |
| section title | `title`       |                       | within `<section>`

### Document title (`titling.xml`)

These all occur at the top level of the enclosing `<document>` element.

| Item                  | Element(s)    | Attributes    | Notes
| ----                  | ----------    | ----------    | -----
| document author       | `author`      |               |
| document date         | `date`        |               |
| assessment due date   | `due-date`    |               | only relevant if `/document/@class = "assignment"`
| document title        | `title`       |               |
| document sub-title    | `subtitle`    |               |

## Bibliographies (`bibliography.xml`)

| Item                  | Element(s)        | Attributes                        | Notes
| ----                  | ----------        | ----------                        | -----
| bibliography          | `bibliography`    | `[name=`*`<section title>`*`]`    | “**`References`**”
| bibliography entry    | `item`            | `label=`*`<string>`*              | within `<bibliography>`
| citation              | `cite`            |                                   |
| cited item            | `item`            | `label=`*`<string>`*              | within `<cite>`

## Maths

### Equations, etc. (`maths.xml`)

| Item                  | Element(s)                | Attributes                        | Notes
| ----                  | ----------                | ----------                        | -----
| calligraphic text     | `calligraphic`            |                                   | LaTeX: `\mathcal`
|                       | `cursive`                 |                                   |
| denominator           | `denominator`             |                                   | within `<fraction>`
| digit group separator | `digit-group-separator`   |                                   | **thin space**
|                       | `digitsep`                |                                   |
| equation array        | `equation-array`          |                                   |
| equation array row    | `row`                     |                                   | within `<equation-array>`
|                       | `text`                    |                                   |
| formula               | `math`                    | `[style=display|`**`inline`**`]`  |
| fraction              | `fraction`                |                                   |
| log-like function     | `function`                |                                   |
| numerator             | `numerator`               |                                   | within `<fraction>`
| subscript             | `subscript`               |                                   | within `<math>`
| superscript           | `superscript`             |                                   | within `<math>`
| variable              | `var`                     |                                   |
|                       | `variable`                |                                   |

### Symbols (`mathematical-symbols.xml`)

| Item                  | Element(s)                        | Attributes                        | Notes
| ----                  | ----------                        | ----------                        | -----
| +                     | `plus`                            |                                   | U+002B PLUS SIGN
|                       | `plus-sign`                       |                                   |
| ×                     | `times`                           |                                   | U+00D7 MULTIPLICATION SIGN
|                       | `multiply`                        |                                   |
|                       | `multiplication`                  |                                   |
|                       | `multiplication-sign`             |                                   |
| −                     | `minus`                           |                                   | U+2212 MINUS SIGN
|                       | `minus-sign`                      |                                   |
|                       | `subtract`                        |                                   |
| ∕                     | `divide`                          |                                   | U+2215 DIVISION SLASH
|                       | `division`                        |                                   |
|                       | `division-slash`                  |                                   |
| =                     | `eq`                              |                                   | U+003D EQUALS SIGN
|                       | `equality`                        |                                   |
|                       | `equals`                          |                                   |
|                       | `equals-sign`                     |                                   |
| ≠                     | `ne`                              |                                   | U+2260 NOT EQUAL TO
|                       | `not-equal-to`                    |                                   |
|                       | `not-equals`                      |                                   |
|                       | `inequality`                      |                                   |
| ≈                     | `almost-equal-to`                 |                                   | U+2248 ALMOST EQUAL TO
|                       | `approx`                          |                                   |
|                       | `approximately-equal-to`          |                                   |
|                       | `approximately-equals`            |                                   |
| >                     | `greater-than`                    |                                   | U+003E GREATER-THAN SIGN
|                       | `greater-than-sign`               |                                   |
|                       | `gt`                              |                                   |
| ≥                     | `ge`                              |                                   | U+2265 GREATER-THAN OR EQUAL TO
|                       | `greater-equals`                  |                                   |
|                       | `greater-than-or-equal-to`        |                                   |
| <                     | `less-than`                       |                                   | U+003C LESS-THAN SIGN
|                       | `less-than-sign`                  |                                   |
|                       | `lt`                              |                                   |
| ≤                     | `le`                              |                                   | U+2264 LESS-THAN OR EQUAL TO
|                       | `less-equals`                     |                                   |
|                       | `less-than-or-equal-to`           |                                   |
| ∅                     | `empty-set`                       |                                   | U+2205 EMPTY SET
|                       | `empty-set-sign`                  |                                   |
|                       | `null`                            |                                   |
| ∈                     | `element`                         |                                   | U+2208 ELEMENT OF
|                       | `element-of`                      |                                   |
|                       | `element-sign`                    |                                   |
|                       | `is-an-element-of`                |                                   |
|                       | `is-element-of`                   |                                   |
| ∉                     | `is-not-an-element-of`            |                                   | U+2209 NOT AN ELEMENT OF
|                       | `is-not-element-of`               |                                   |
|                       | `not-an-element-of`               |                                   |
|                       | `not-element`                     |                                   |
|                       | `not-element-of`                  |                                   |
|                       | `not-element-sign`                |                                   |
| ∩                     | `cap`                             |                                   | U+2229 INTERSECTION
|                       | `intersect`                       |                                   |
|                       | `intersect-operator`              |                                   |
|                       | `intersection`                    |                                   |
| ∪                     | `cup`                             |                                   | U+222A UNION
|                       | `union`                           |                                   |
|                       | `union-operator`                  |                                   |
| ⊂                     | `is-a-subset-of`                  |                                   | U+2282 SUBSET OF
|                       | `is-subset-of`                    |                                   |
|                       | `strict-subset`                   |                                   |
|                       | `subset`                          |                                   |
|                       | `subset-of`                       |                                   |
|                       | `subset-sign`                     |                                   |
| ⊃                     | `is-a-superset-of`                |                                   | U+2283 SUPERSET OF
|                       | `is-superset-of`                  |                                   |
|                       | `superset`                        |                                   |
|                       | `superset-of`                     |                                   |
|                       | `superset-sign`                   |                                   |
| ⊆                     | `inclusive-subset`                |                                   | U+2286 SUBSET OF OR EQUAL TO
|                       | `is-a-subset-of-or-equal-to`      |                                   |
|                       | `is-subset-of-or-equal-to`        |                                   |
|                       | `subset-of-or-equal-to`           |                                   |
|                       | `subset-or-equal`                 |                                   |
| ⊇                     | `inclusive-superset`              |                                   | U+2287 SUPERSET OF OR EQUAL TO
|                       | `is-a-superset-of-or-equal-to`    |                                   |
|                       | `is-superset-of-or-equal-to`      |                                   |
|                       | `superset-of-or-equal-to`         |                                   |
|                       | `superset-or-equal`               |                                   |
| ¬                     | `neg`                             |                                   | U+00AC NOT SIGN
|                       | `negation`                        |                                   |
|                       | `logical-negation`                |                                   |
|                       | `logical-negation-operator`       |                                   |
|                       | `logical-not`                     |                                   |
|                       | `logical-not-operator`            |                                   |
|                       | `not`                             |                                   |
|                       | `not-sign`                        |                                   |
| ∧                     | `and`                             |                                   | U+2227 LOGICAL AND
|                       | `and-operator`                    |                                   |
|                       | `hat`                             |                                   |
|                       | `logical-and`                     |                                   |
|                       | `logical-and-operator`            |                                   |
|                       | `wedge`                           |                                   |
| ∨                     | `logical-or`                      |                                   | U+2228 LOGICAL OR
|                       | `logical-or-operator`             |                                   |
|                       | `or`                              |                                   |
|                       | `or-operator`                     |                                   |
|                       | `vee`                             |                                   |
| →, ⇒                  | `implies`                         | `[weight=double|`**`single`**`]`  | U+2192 RIGHTWARDS ARROW
|                       | `rarr`                            |                                   | U+21D2 RIGHTWARDS DOUBLE ARROW
|                       | `rarrow`                          |                                   |
|                       | `right-arrow`                     |                                   |
|                       | `rightarrow`                      |                                   |
|                       | `rightwards-arrow`                |                                   |
| ←, ⇐                  | `larr`                            | `[weight=double|`**`single`**`]`  | U+2190 LEFTWARDS ARROW
|                       | `larrow`                          |                                   | U+21D0 LEFTWARDS DOUBLE ARROW
|                       | `left-arrow`                      |                                   |
|                       | `leftarrow`                       |                                   |
|                       | `leftwards-arrow`                 |                                   |

### Relational algebra (`relational-algebra.xml`)

| Item                  | Element(s)                | Attributes                        | Notes
| ----                  | ----------                | ----------                        | -----
| project operator (π)  | `project`                 |                                   | U+03C0 GREEK SMALL LETTER PI
|                       | `project-operator`        |                                   |
|                       | `relational-project`      |                                   |
| extend operator (ε)   | `extend`                  |                                   | U+03B5 GREEK SMALL LETTER EPSILON
|                       | `extend-operator`         |                                   |
|                       | `relational-extend`       |                                   |
| rename operator (ρ)   | `relational-rename`       |                                   | U+03C1 GREEK SMALL LETTER RHO
|                       | `rename`                  |                                   |
|                       | `rename-operator`         |                                   |
| restrict operator (σ) | `restrict`                |                                   | U+03C2 GREEK SMALL LETTER SIGMA
|                       | `restrict-operator`       |                                   |
|                       | `relational-restrict`     |                                   |
| join operator (⋈)     | `bowtie`                  |                                   | U+22C8 BOWTIE
|                       | `inner-join`              |                                   | (or U+2A1D JOIN)
|                       | `join`                    |                                   |
|                       | `join-operator`           |                                   |
|                       | `natural-join`            |                                   |
|                       | `relational-join`         |                                   |
| outer join operator   | `outer-join`              | `[type=`**`full`**`|left|right]`  | U+27D5 LEFT OUTER JOIN
|                       | `outer-join-operator`     |                                   | U+27D6 RIGHT OUTER JOIN
|                       | `relational-outer-join`   |                                   | U+27D7 FULL OUTER JOIN

### Greek (`greek-characters.xml`)

| Item                  | Element(s)        | Attributes    | Notes
| ----                  | ----------        | ----------    | -----
| α                     | `alpha`           |               | U+03B1 GREEK SMALL LETTER ALPHA
| Α                     | `capital-alpha`   |               | U+0391 GREEK CAPITAL LETTER ALPHA
| β                     | `beta`            |               | U+03B2 GREEK SMALL LETTER BETA
| Β                     | `capital-beta`    |               | U+0392 GREEK CAPITAL LETTER BETA
| γ                     | `gamma`           |               | U+03B3 GREEK SMALL LETTER GAMMA
| Γ                     | `capital-gamma`   |               | U+0393 GREEK CAPITAL LETTER GAMMA
| δ                     | `delta`           |               | U+03B4 GREEK SMALL LETTER DELTA
| Δ                     | `capital-delta`   |               | U+0394 GREEK CAPITAL LETTER DELTA
| ε                     | `epsilon`         |               | U+03B5 GREEK SMALL LETTER EPSILON
| Ε                     | `capital-epsilon` |               | U+0395 GREEK CAPITAL LETTER EPSILON
| ζ                     | `zeta`            |               | U+03B6 GREEK SMALL LETTER ZETA
| Ζ                     | `capital-zeta`    |               | U+0396 GREEK CAPITAL LETTER ZETA
| η                     | `eta`             |               | U+03B7 GREEK SMALL LETTER ETA
| Η                     | `capital-eta`     |               | U+0397 GREEK CAPITAL LETTER ETA
| θ                     | `theta`           |               | U+03B8 GREEK SMALL LETTER THETA
| Θ                     | `capital-theta`   |               | U+0398 GREEK CAPITAL LETTER THETA
| ι                     | `iota`            |               | U+03B9 GREEK SMALL LETTER IOTA
| Ι                     | `capital-iota`    |               | U+0399 GREEK CAPITAL LETTER IOTA
| κ                     | `kappa`           |               | U+03BA GREEK SMALL LETTER KAPPA
| Κ                     | `capital-kappa`   |               | U+039A GREEK CAPITAL LETTER KAPPA
| λ                     | `lambda`          |               | U+03BB GREEK SMALL LETTER LAMBDA
| Λ                     | `capital-lambda`  |               | U+039B GREEK CAPITAL LETTER LAMBDA
| μ                     | `mu`              |               | U+03BC GREEK SMALL LETTER MU
| Μ                     | `capital-mu`      |               | U+039C GREEK CAPITAL LETTER MU
| ν                     | `nu`              |               | U+03BD GREEK SMALL LETTER NU
| Ν                     | `capital-nu`      |               | U+039D GREEK CAPITAL LETTER NU
| ξ                     | `xi`              |               | U+03BE GREEK SMALL LETTER XI
| Ξ                     | `capital-xi`      |               | U+039E GREEK CAPITAL LETTER XI
| ο                     | `omicron`         |               | U+03BF GREEK SMALL LETTER OMICRON
| Ο                     | `capital-omicron` |               | U+039F GREEK CAPITAL LETTER OMICRON
| π                     | `pi`              |               | U+03C0 GREEK SMALL LETTER PI
| Π                     | `capital-pi`      |               | U+03A0 GREEK CAPITAL LETTER PI
| ρ                     | `rho`             |               | U+03C1 GREEK SMALL LETTER RHO
| Ρ                     | `capital-rho`     |               | U+03A1 GREEK CAPITAL LETTER RHO
| σ                     | `sigma`           |               | U+03C2 GREEK SMALL LETTER SIGMA
| Σ                     | `capital-sigma`   |               | U+03A3 GREEK CAPITAL LETTER SIGMA
| τ                     | `tau`             |               | U+03C4 GREEK SMALL LETTER TAU
| Τ                     | `capital-tau`     |               | U+03A4 GREEK CAPITAL LETTER TAU
| υ                     | `upsilon`         |               | U+03C5 GREEK SMALL LETTER UPSILON
| Υ                     | `capital-upsilon` |               | U+03A5 GREEK CAPITAL LETTER UPSILON
| φ                     | `phi`             |               | U+03C6 GREEK PHI SYMBOL (for consistency with LaTeX)
| Φ                     | `capital-phi`     |               | U+03A6 GREEK CAPITAL LETTER PHI
| χ                     | `chi`             |               | U+03C7 GREEK SMALL LETTER CHI
| Χ                     | `capital-chi`     |               | U+03A7 GREEK CAPITAL LETTER CHI
| ψ                     | `psi`             |               | U+03C8 GREEK SMALL LETTER PSI
| Ψ                     | `capital-psi`     |               | U+03A8 GREEK CAPITAL LETTER PSI
| ω                     | `omega`           |               | U+03C9 GREEK SMALL LETTER OMEGA
| Ω                     | `capital-omega`   |               | U+03A9 GREEK CAPITAL LETTER OMEGA

## Teaching related items

### Otago specific elements (`otago-specific.xml`)

| Item          | Element(s)        | Attributes    | Notes
| ----          | ----------        | ----------    | -----
| paper code    | `paper`           |               |
| paper number  | `paper-number`    |               | within `<paper>`
| subject code  | `subject-code`    |               | within `<paper>`

### Questions and answers (`q-and-a.xml`)

| Item          | Element(s)    | Attributes                | Notes
| ----          | ----------    | ----------                | -----
| answer        | `answer`      | `[hide=`**`no`**`|yes]`   |
| exercise      | `exercise`    | `label=`*`<string>`*      | numbered exercise, in box
| question      | `question`    |                           |

### Teaching dates (`paper-calendar-dates.xml`)

Note that `paper-calendar-dates.xml` is generated for a particular year by `generate-calendar-dates.php`.

| Item          | Element(s)                    | Attributes                                                        | Notes
| ----          | ----------                    | ----------                                                        | -----
| date          | `TeachingPeriodDate`          | `period=FY|S1|S2|SS|YY`                                           |
|               |                               | `week=`*`<integer>`*                                              | within period
|               |                               | `[format=day|day-short|day-short+year|day+long-name|`             |
|               |                               | `day+short-name|day+year|`**`ISO`**`|`*`<XML date picture>`*`]`   |
|               |                               | `[offset=(+|-)`*`<XSLT duration>`*`]`                             | e.g., “P1D”, “-P4D”
| date range    | `TeachingPeriodDateRange`     | `format=long|short`                                               |
|               |                               | `period=FY|S1|S2|SS|YY`                                           |
|               |                               | `week=`*`<integer>`*                                              | within period
|               |                               | `[wrap=no|`**`yes`**`]`                                           |

### Teaching calendar (`paper-calendar.xml`)

| Item              | Element(s)                | Attributes                                | Notes
| ----              | ----------                | ----------                                | -----
| assessment        | `assessment`              | `[rows=`*`<integer>`*`]`                  | **`calendar/@lectures-per-week`**
| calendar table    | `calendar`                | `lectures-per-week=`*`<integer>`*         |
|                   |                           | `number-of-weeks=`*`<integer>`*           |
|                   |                           | `[number-laboratories=no|`**`yes`**`]`    |
|                   |                           | `[number-lectures=no|`**`yes`**`]`        |
|                   |                           | `[number-tutorials=no|`**`yes`**`]`       |
| footer row        | `footer`                  |                                           |
| header row        | `header`                  |                                           |
| note              | `note`                    | `[num-columns=`*`<integer>`*`]`           | **all columns**
| laboratory        | `laboratory`              | `[number=no|yes]`                         | **`yes`** or **`calendar/@number-laboratories`**
|                   |                           | `[rows=`*`<integer>`*`]`                  | **`calendar/@lectures-per-week`**
| lecture           | `lecture`                 | `[holiday=`**`no`**`|yes]`                |
|                   |                           | `[number=no|yes]`                         | **`yes`** or **`calendar/@number-lectures`**
|                   |                           | `[rows=`*`<integer>`*`]`                  | **`1`**
| page break        | `latex-calendar-break`    | `[caption=no|`**`yes`**`]`                |
|                   |                           | `[caption-text=`*`<string>`*`]`           |
| reading           | `reading`                 | `[rows=`*`<integer>`*`]`                  | **`calendar/@lectures-per-week`**
| section           | `section`                 | `[rows=`*`<integer>`*`]`                  | **`calendar/@lectures-per-week`**
| table heading     | `heading`                 | `[num-columns=`*`<integer>`*`]`           | **`1`**
| table footing     | `footing`                 | `[num-columns=`*`<integer>`*`]`           | **`1`**
| tutorial          | `tutorial`                | `[number=no|yes]`                         | **`yes`** or **`calendar/@number-tutorials`**
| week              | `week`                    | `[holiday=`**`no`**`|yes]`                |
|                   |                           | `[rows=`*`<integer>`*`]`                  | **`calendar/@lectures-per-week`**

## Miscellaneous

### Document build date (`build-date.xml`)

| Item                  | Element(s)        | Attributes                            | Notes
| ----                  | ----------        | ----------                            | -----
| displayed build date  | `build-date`      | `[format=`*`<XML date picture>`*`]`   |   **`YYYY-MM-DD hh:mm:ss`**
|                       |                   | `[style=footer|`**`inline`**`]`       |

### Conditional processing (`conditional-processing.xml`)

| Item                  | Element(s)        | Attributes            | Notes
| ----                  | ----------        | ----------            | -----
| process when format   | `process-when`    | `format=latex|html`   |

### Native code (`native-code.xml`)

| Item      | Element(s)    | Attributes            | Notes
| ----      | ----------    | ----------            | -----
| raw code  | `raw-code`    | `format=html|latex`   |
| raw LaTeX | `raw-latex`   |                       |
| raw HTML  | `raw-html`    |                       |

### LaTeX specific (`latex.xml`)

| Item              | Element(s)                | Attributes                    | Notes
| ----              | ----------                | ----------                    | -----
| document class    | `latex-documentclass`     | `[options=`*`<options>`*`]`   |
|                   | `documentclass`           |                               |
| document options  | `latex-document-options`  |                               |
| LaTeX environment | `environment`             |                               |
| LaTeX packages    | `latex-packages`          |                               |
|                   | `package`                 | `[options=`*`<options>`*`]`   | within `<latex-packages>`
| preamble commands | `latex-commands`          |                               |
|                   | `command`                 |                               | within `<latex-commands>`
|                   | `hyphenation`             |                               | within `<latex-commands>`

### Global elements (`global-elements.xml`)

These essentially define global “variables” within the document.

| Item                  | Element(s)            | Attributes                            | Notes
| ----                  | ----------            | ----------                            | -----
| assessment due date   | `DueDate`             | `[style={bold|italic|underline}]`     | requires top-level `<due-date>`
|                       |                       |                                       | only relevant if `/document/@class = "assignment"`
| Blackboard URL        | `Blackboard`          |                                       | **`https://blackboard.otago.ac.nz/`**
| full paper code       | `PaperCode`           |                                       | e.g., “INFO 202”
| Oracle “name”         | `OracleServer`        |                                       | e.g., “Oracle11*g*”
| Oracle release number | `OracleServerRelease` |                                       | e.g., “2”
| Oracle version number | `OracleServerVersion` |                                       | e.g., “11.2”
| paper number          | `PaperNumber`         |                                       | e.g., “202”
| period paper offered  | `PaperPeriod`         |                                       | e.g., “Second Semester”
| subject code          | `SubjectCode`         |                                       | “**`INFO`**”
| year paper offered    | `PaperYear`           | `[offset=`*`<integer>`*`]`            | **`0`**

### File inclusions (`inclusions.xml`)

| Item                  | Element(s)            | Attributes                    | Notes
| ----                  | ----------            | ----------                    | -----
| include document      | `include-document`    | `basename=`*`<filename>`*     | including suffix
|                       |                       | `type=html|latex|plain|xml`   | HTML: **`html`**
|                       |                       |                               | LaTeX: **`latex`**
|                       |                       |                               | `xml` currently unsupported
|                       |                       | `[path=`*`<path>`*`]`         | without trailiing /

### Meta-elements (`meta-elements.xml`)

| Item          | Element(s)    | Attributes    | Notes
| ----          | ----------    | ----------    | -----
| ignore markup | `omit`        |               |
| to-do item    | `check`       |               |
|               | `incomplete`  |               |
|               | `to-do`       |               |
|               | `todo`        |               |
| XML comment   | `comment`     |               |

### Emoticons (`emoticons.xml`)

| Item      | Element(s)    | Attributes                                | Notes
| ----      | ----------    | ----------                                | -----
| emoticon  | `emoticon`    | `[type=`**`happy`**`|meh|neutral|sad]`    | happy = U+263A WHITE SMILING FACE
|           | `smiley`      |                                           | sad = U+2639 WHITE FROWNING FACE

### Path-like elements (`path-like-elements.xml`)

| Item              | Element(s)            | Attributes    | Notes
| ----              | ----------            | ----------    | -----
| file system path  | `directory`           |               |
| keystroke         | `keys`                |               |
| menu              | `menu`                |               |
| “path item”       | `item`                |               | within `<directory>`, `<keys>`, or `<menu>`
| alt graphics key  | `alt-graphics-key`    |               |
| alt key           | `alt-key`             |               |
| backspace key     | `backspace-key`       |               |
| caps lock key     | `capslock-key`        |               |
| command key (⌘)   | `command-key`         |               |
| control key       | `control-key`         |               |
| delete key        | `delete-key`          |               |
| down arrow key    | `down-arrow-key`      |               |
| enter key         | `enter-key`           |               |
| escape key        | `escape-key`          |               |
| left arrow key    | `left-arrow-key`      |               |
| return key        | `return-key`          |               |
| right arrow key   | `right-arrow-key`     |               |
| shift key         | `shift-key`           |               |
| space key         | `space-key`           |               |
| tab key           | `tab-key`             |               |
| up arrow key      | `up-arrow-key`        |               |
| windows key       | `windows-key`         |               |

### Multi-column layouts (`multi-column.xml`)

| Item                  | Element(s)        | Attributes                                                        | Notes
| ----                  | ----------        | ----------                                                        | -----
| multi-column layout   | `multi-column`    | `[align=center|`**`left`**`|right]`                               |
|                       |                   | `[vspace=big|medium|small|`*`<LaTeX length>`*`|`**_`<none>`_**`]` |
|                       |                   | `[width=`*`<decimal>`*`]`                                         | between `0` and **`1`**
| column                | `column`          | `[align=center|`**`left`**`|right]`                               |
|                       |                   | `[width=`*`<decimal>`*`]`                                         | between `0` and `1`

modules/cross-references.xml:   <template name="reference" match="reference[@label]">
modules/cross-references.xml:   <template name="broken-reference" match="reference[not( @label )]">
modules/cross-references.xml:   <template name="section-reference" match="section" mode="reference">
modules/cross-references.xml:   <template name="figure-reference" match="figure" mode="reference">
modules/cross-references.xml:   <template name="table-reference" match="table" mode="reference">
modules/cross-references.xml:   <template name="exercise-reference" match="exercise" mode="reference">
modules/cross-references.xml:   <template name="item-page-reference" match="section|figure|table" mode="page-reference">
modules/cross-references.xml:   <template name="page" match="page[@label]">
modules/cross-references.xml:   <template name="broken-page" match="page[not( @label )]">
modules/cross-references.xml:   <template name="direct-page-reference" match="page[@label]" mode="reference">
modules/floaters.xml:   <template name="figure" match="figure">
modules/floaters.xml:   <template name="table" match="table">
modules/floaters.xml:   <template name="multipart-table" match="table[count(part) gt 0]">
modules/floaters.xml:   <template name="figure-caption" match="figure/caption">
modules/floaters.xml:   <template name="table-caption" match="table/caption">
modules/footnotes.xml:  <template name="footnote" match="footnote">
modules/footnotes.xml:  <template name="footnote-list" match="footnote" mode="list">
modules/hyperlinks.xml: <template name="hyperlink-label" match="hyperlink[@label and node()]">
modules/hyperlinks.xml: <template name="hyperlink-url" match="hyperlink[@url and node()]">
modules/hyperlinks.xml: <template name="empty-hyperlink-url" match="hyperlink[@url and not( node() )]">
modules/hyperlinks.xml: <template name="empty-hyperlink-label" match="hyperlink[@label and not( node() )]">
modules/hyperlinks.xml: <template name="hyperlink-bogus" match="hyperlink[@url and @label]" priority="2">
modules/hyperlinks.xml: <template name="hyperlink-internal" match="hyperlink" mode="hyperlink-internal">
modules/hyperlinks.xml: <template name="empty-hyperlink-url-internal" match="hyperlink" mode="empty-hyperlink-internal">
modules/hyperlinks.xml: <template name="url" match="url|uri|email|e-mail|email-address|e-mail-address">
modules/images.xml: <template name="latex-image" match="image" mode="latex">
modules/images.xml: <template name="normal-image" match="image[count(provide-large-version) = 0]">
modules/images.xml: <template name="zoomable-image" match="image[count(provide-large-version) != 0]">
modules/lists.xml:  <template name="itemised-list" match="itemised-list|itemize|unordered-list|bulleted-list|bullet-list|bullet-points|UL|ul">
modules/lists.xml:  <template name="enumerated-list" match="enumerated-list|enumerate|ordered-list|numbered-list|question-list|OL|ol">
modules/lists.xml:  <template name="definition-list" match="definition-list|description-list|DL|dl">
modules/lists.xml:  <template name="list-item" match="item" mode="normal">
modules/lists.xml:  <template name="enumerated-item-value" match="item[@value]" mode="enumerated-list">
modules/lists.xml:  <template name="enumerated-item" match="item[not( @value )]" mode="enumerated-list">
modules/lists.xml:  <template name="definition-item" match="item" mode="definition-list">
modules/lists.xml:  <template name="keyword" match="item/keyword|item/term|item/topic|item/DT|item/dt">
modules/lists.xml:  <template name="definition" match="item/definition|item/description|item/discourse|item/DD|item/dd">
modules/quotations.xml: <template name="single-quote" match="quote[@single='yes']|q[@single='yes']">
modules/quotations.xml: <template name="double-quote" match="quote|qq">
modules/quotations.xml: <template name="nested-double-quote" match="quote//quote">
modules/quotations.xml: <template name="nested-single-quote" match="quote[@single='yes']//quote" priority="2">
modules/quotations.xml: <template name="quotation" match="quotation">
modules/tabular.xml:    <template name="tabular" match="tabular">
modules/tabular.xml:    <template name="aligned-tabular-column" match="tabular-columns/column[@align]">
modules/tabular.xml:    <template name="unaligned-tabular-column" match="tabular-columns/column[not(@align)]">
modules/tabular.xml:    <template name="tabular-header" match="tabular-header">
modules/tabular.xml:    <template name="tabular-footer" match="tabular-footer">
modules/tabular.xml:    <template name="tabular-body" match="tabular-body">
modules/tabular.xml:    <template name="row" match="row">
modules/tabular.xml:    <template name="last-row-body" match="tabular-body/row[( position() = last() ) and not( following-sibling::row-rule ) and not( ancestor::tabular/tabular-footer )]|tabular-footer/row[position() = last() and not( following-sibling::row-rule )]">
modules/tabular.xml:    <template name="row-rule-full" match="row-rule[not(@columns)]">
modules/tabular.xml:    <template name="row-rule-partial" match="row-rule[@columns]">
modules/tabular.xml:    <template name="multirow-cell" match="cell" mode="latex-multi-row">
modules/tabular.xml:    <template name="multicolumn-cell" match="cell" mode="latex-multi-column">
modules/tabular.xml:    <template match="cell">