io7m
io7m-jstructural 3.1.0
io7m-jstructural 3.1.0 Documentation

- 1. Package Information
  - 1.1. Orientation
  - 1.2. Installation
  - 1.3. Platform Specific Issues
  - 1.4. License
- 2. API Tutorial
  - 2.1. API Tutorial
- 3. API Reference
  - 3.1. Javadoc
- 4. Tool Reference
  - 4.1. jsc
- 5. Element Reference
  - 5.1. Overview
  - 5.2. document
  - 5.3. document-contents
  - 5.4. document-style
  - 5.5. document-title
  - 5.6. footnote
  - 5.7. formal-item
  - 5.8. formal-item-list
  - 5.9. formal-item-title
  - 5.10. image
  - 5.11. link
  - 5.12. link-external
  - 5.13. list-item
  - 5.14. list-ordered
  - 5.15. list-unordered
  - 5.16. paragraph
  - 5.17. part
  - 5.18. part-contents
  - 5.19. part-title
  - 5.20. section
  - 5.21. section-contents
  - 5.22. section-title
  - 5.23. subsection
  - 5.24. subsection-title
  - 5.25. table
  - 5.26. table-body
  - 5.27. table-cell
  - 5.28. table-column-name
  - 5.29. table-head
  - 5.30. table-row
  - 5.31. table-summary
  - 5.32. term
  - 5.33. verbatim

1
Package Information

- 1.1. Orientation
  - 1.1.1. Overview
  - 1.1.2. Portability
  - 1.1.3. Simplicity
- 1.2. Installation
  - 1.2.1. Source compilation
- 1.3. Platform Specific Issues
- 1.4. License

1.1
Orientation
1.1.1
Overview
1
The jstructural package implements a set of primitives for producing technical documentation. The package provides RELAX-NG and XSD schemas describing the format of structural documents and a set of Java tools for producing XHTML 1.0 Strict output.
2
In contrast to other systems such as DocBook, the structural language only defines elements concerning the structure of the document and not the semantics of the elements. The intention is that higher level languages will produce structural documents as output and then use the provided stylesheets to get various services such as table of contents generation, chapter numbering, footnotes, et cetera, without having to re-implement all of those features for each new language.
1.1.2
Portability
1
The canonical format for the structural schema is RELAX-NG, but an XSD schema (generated from the RELAX-NG schema is also provided, for validation using tools that do not support RELAX-NG).
2
The provided structural to XHTML translator is written in pure Java and should be usable on any JVM that supports Java 6 and newer.
1.1.3
Simplicity
1
As the structural language focuses only on structural elements, it is far simpler than any of the other XML documentation formats. As an example, DocBook, which mixes structural and semantic elements, defines nearly 400 elements as opposed to the 30 or so defined by the structural language.
2
Given the small number of elements and the relatively strict schema, the number of possible permutations of elements is low and, as a result, the XHTML output is easily predictable [0].
1.2
Installation
1.2.1
Source compilation
1
The project can be compiled and installed with Maven:
2

    $ mvn -C clean install

1.3
Platform Specific Issues
1
There are no known platform-specific issues.
1.4
License
1
All files distributed with the structural package are placed under the following license:

    Copyright © 2014 <code@io7m.com> http://io7m.com

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

2
Exceptions to the above are the files:
1.4.1. Schema files

- io7m-jstructural-tests/src/test/resources/com/io7m/jstructural/xhtml1-strict.xsd
- io7m-jstructural-tests/src/test/resources/com/io7m/jstructural/xml.xsd

3
These files are the XSD schema for XHTML Strict 1.0 [1] and are used by the test suite to validate the XHTML output produced by all test documents. They are included to allow the test suite to execute on machines that do not have network access (and therefore cannot fetch the schema files from the w3 servers). They are covered by at least one of the w3's many licenses [2]. Unfortunately, we're not exactly sure which. No infringement is intended.
2
API Tutorial

- 2.1. API Tutorial
  - 2.1.1. Overview
  - 2.1.2. Usage

2.1
API Tutorial
2.1.1
Overview
1
The jstructural API is divided into core and annotated types. The core types have an (almost) 1:1 correspondence with the elements that a document author writes in XML. The parser included with the XOM backend, for example, produces a document consisting of elements of the core types from an XML file. The annotated types are, unsurprisingly, values of the core types with additional annotations and metadata required to actually produce documents in XHTML format.
2.1.2
Usage
1
Parsing documents and producing XHTML output is quite simple. First, a stream representing an XML file is given to the included parser, which parses and validates the document against the structural schema.
2.1.2.1. Parsing

    URI uri;
    Log log;
    InputStream stream;

    final SDocument doc = SDocumentParser.fromStream(stream, uri, log);

2
Then, the resulting document is annotated with the included annotator:
2.1.2.2. Annotation

    Log log;
    SDocument doc;

    final SADocument adoc = SAnnotator.document (doc, log);

3
Finally, either the single-page writer or multi-page writer are used to produce a set of XHTML documents that can be serialized using the standard XOM serializer.
2.1.2.3. Writing

    Log log;
    SADocument doc;
    SDocumentXHTMLWriterCallbacks callbacks;

    SDocumentXHTMLWriterSingle writer = new SDocumentXHTMLWriterSingle();
    SortedMap<String, Document> pages = writer.writeDocuments(callbacks, doc);

4
The map returned by the writeDocuments function is a set of mappings from file names to documents.
5
The writers take a set of callbacks as arguments that can be used to customize the resulting output. See the javadoc for details.
3
API Reference

- 3.1. Javadoc

3.1
Javadoc
1
API documentation for the packages is provided via the included Javadoc.
4
Tool Reference

- 4.1. jsc
  - 4.1.1. Overview
  - 4.1.2. Packaging

4.1
jsc
4.1.1
Overview
1
The jsc tool transforms structural documents into XHTML 1.0 Strict.
2

    jsc: [options] --check        file
      or [options] --xhtml-single file outdir
      or [options] --xhtml-multi  file outdir
      or [options] --version

         --check                      Parse and validate all source files, but do not produce output
         --debug                      Enable debugging (debug messages, exception backtraces)
      -h,--help                       Show this help message
         --version                    Display version
         --xhtml-body-end <file>      Insert the given file into the resulting XHTML at the end of the document's body
         --xhtml-body-start <file>    Insert the given file into the resulting XHTML at the start of the document's body
         --xhtml-multi                Produce multiple XHTML files as output
         --xhtml-single               Produce a single XHTML file as output

3
When the --check argument is specified, the file file is parsed and validated according to the structural schema. XIncludes are understood by jsc and will be processed prior to validation.
4
When the --xhtml-single argument is specified, the given file is validated exactly as with --check, and then a single XHTML 1.0 Strict document is written to outdir/index.xhtml. The outdir directory is created iff it does not already exist.
5
When the --xhtml-multi argument is specified, the given file is validated exactly as with --check, and then a single XHTML 1.0 Strict document is written to outdir/index-m.xhtml, which represents the front page of the document, and a series of files are written to outdir/*.xhtml, representing the parts and sections of the document. The outdir directory is created iff it does not already exist.
6
When either --xhtml-multi or --xhtml-single are specified, the files outdir/jstructural-3.1.0-layout.css and outdir/jstructural-3.1.0-colour.css are created iff they do not already exist. These files contain CSS controlling the visual presentation of the XHTML.
7
The --xhtml-body-start option causes the contents of the given XML file to be inserted as the first child of the resulting XHTML body element on each page. It is the user's responsibility to ensure that the resulting document is valid XHTML 1.0 Strict.
8
The --xhtml-body-end option causes the contents of the given XML file to be inserted as the last child of the resulting XHTML body element on each page. It is the user's responsibility to ensure that the resulting document is valid XHTML 1.0 Strict.
4.1.2
Packaging
1
The jsc tool is packaged into the standalone io7m-jstructural-tools-3.1.0-jsc.jar file distributed with jstructural.
5
Element Reference

- 5.1. Overview
  - 5.1.1. Namespace URI
  - 5.1.2. Attributes
  - 5.1.3. CSS
  - 5.1.4. Navigation Bar
- 5.2. document
  - 5.2.1. Description
  - 5.2.2. Processing
  - 5.2.3. Children
- 5.3. document-contents
  - 5.3.1. Description
  - 5.3.2. Processing
  - 5.3.3. CSS
- 5.4. document-style
  - 5.4.1. Description
  - 5.4.2. Processing
  - 5.4.3. Children
- 5.5. document-title
  - 5.5.1. Description
  - 5.5.2. CSS
- 5.6. footnote
  - 5.6.1. Description
  - 5.6.2. Children
  - 5.6.3. CSS
  - 5.6.4. Example
- 5.7. formal-item
  - 5.7.1. Description
  - 5.7.2. Children
  - 5.7.3. CSS
  - 5.7.4. Example
- 5.8. formal-item-list
  - 5.8.1. Description
  - 5.8.2. CSS
  - 5.8.3. Example
- 5.9. formal-item-title
  - 5.9.1. Description
  - 5.9.2. CSS
  - 5.9.3. Example
- 5.10. image
  - 5.10.1. Description
  - 5.10.2. CSS
  - 5.10.3. Example
- 5.11. link
  - 5.11.1. Description
  - 5.11.2. Children
  - 5.11.3. CSS
  - 5.11.4. Example
- 5.12. link-external
  - 5.12.1. Description
  - 5.12.2. Children
  - 5.12.3. CSS
  - 5.12.4. Example
- 5.13. list-item
  - 5.13.1. Description
  - 5.13.2. Children
  - 5.13.3. CSS
- 5.14. list-ordered
  - 5.14.1. Description
  - 5.14.2. Children
  - 5.14.3. CSS
- 5.15. list-unordered
  - 5.15.1. Description
  - 5.15.2. Children
  - 5.15.3. CSS
- 5.16. paragraph
  - 5.16.1. Description
  - 5.16.2. Children
  - 5.16.3. CSS
- 5.17. part
  - 5.17.1. Description
  - 5.17.2. Processing
  - 5.17.3. Children
  - 5.17.4. CSS
- 5.18. part-contents
  - 5.18.1. Description
  - 5.18.2. Processing
  - 5.18.3. CSS
- 5.19. part-title
  - 5.19.1. Description
  - 5.19.2. CSS
- 5.20. section
  - 5.20.1. Description
  - 5.20.2. Processing
  - 5.20.3. Children
  - 5.20.4. CSS
  - 5.20.5. Example
- 5.21. section-contents
  - 5.21.1. Description
  - 5.21.2. Processing
  - 5.21.3. CSS
  - 5.21.4. Example
- 5.22. section-title
  - 5.22.1. Description
  - 5.22.2. CSS
  - 5.22.3. Example
- 5.23. subsection
  - 5.23.1. Description
  - 5.23.2. Children
  - 5.23.3. Example
  - 5.23.4. CSS
- 5.24. subsection-title
  - 5.24.1. Description
  - 5.24.2. CSS
  - 5.24.3. Example
- 5.25. table
  - 5.25.1. Description
  - 5.25.2. Children
  - 5.25.3. CSS
  - 5.25.4. Example
- 5.26. table-body
  - 5.26.1. Description
  - 5.26.2. Children
  - 5.26.3. CSS
- 5.27. table-cell
  - 5.27.1. Description
  - 5.27.2. Children
  - 5.27.3. CSS
- 5.28. table-column-name
  - 5.28.1. Description
  - 5.28.2. CSS
- 5.29. table-head
  - 5.29.1. Description
  - 5.29.2. Children
  - 5.29.3. CSS
- 5.30. table-row
  - 5.30.1. Description
  - 5.30.2. Children
  - 5.30.3. CSS
- 5.31. table-summary
  - 5.31.1. Description
- 5.32. term
  - 5.32.1. Description
  - 5.32.2. CSS
  - 5.32.3. Example
- 5.33. verbatim
  - 5.33.1. Description
  - 5.33.2. CSS

5.1
Overview
5.1.1
Namespace URI
1
All structural elements are in the http://schemas.io7m.com/structural/2.0.0 namespace.
5.1.2
Attributes
1
All elements may have the standard xml:lang and xml:base attributes.
2
The following elements may have a type attribute and an xml:id attribute:

- document
- formal-item
- image
- list-item
- list-ordered
- list-unordered
- paragraph
- part
- section
- subsection
- term
- verbatim

3
The contents of the type attribute are appended to the resulting CSS class attribute of the element in the XHTML output.
4
Elements with an xml:id attribute can be linked to using the link element.
5
When the XSLT stylesheet encounters an xml:id attribute on an element, it generates an XHTML anchor with an id attribute consisting of the original xml:id attribute contents prefixed with "ref_". This allows linking to specific elements in the resulting XHTML documents from external locations. As an example, given an element:

    <s:term s:type="something" xml:id="a_term">Hello</s:term>

The XHTML output will be similar to:

    <a id="ref_a_term"></a>
    <span class="st200_term something">Hello</span>

5.1.3
CSS
1
The XHTML elements resulting from each structural element are assigned specific CSS classes for easy styling of the output. The CSS classes are documented with each element.
5.1.4
Navigation Bar
1
A navigation bar is placed at the top and bottom each generated page.
2
For pages generated from section or part elements, the navigation bar contains links to the previous and next pages, and the enclosing section or part. The navigation bar also displays the titles of the destination pages above each link. For pages generated from document elements, only a link to the first section or part element is generated.
3
The navigation bar itself is assigned the CSS class st200_navbar in addition to the class st200_navbar_top or st200_navbar_bottom depending on where the bar in question appears on the page.
4
The bar is a table structure with each cell being assigned one of the following CSS classes:

- st200_navbar_prev_file_cell
- st200_navbar_up_file_cell
- st200_navbar_next_file_cell
- st200_navbar_prev_title_cell
- st200_navbar_up_title_cell
- st200_navbar_next_title_cell

5.2
document
5.2.1
Description
1
The document element denotes a structural document. It must appear as the root node of an XML document. The element may contain either a series of sections or a series of parts.
2
document elements appear in table of contents entries (usually as the root), labelled with their respective document-title.
5.2.2
Processing
1
The document element creates a new output file when encountered.
5.2.3
Children
1
The following elements may occur as children of document elements:

- document-contents
- document-style
- document-title
- part
- section

5.3
document-contents
5.3.1
Description
1
The document-contents element specifies that a table of contents should be generated for the given document.
2
Iff the document in question contains part elements, subsection elements are omitted from the list.
5.3.2
Processing
1
The table of contents appears at the start of the parent document and contains references to all the children of that element.
5.3.3
CSS
1
In addition to any classes specified by the type attribute, the main XHTML structure is assigned the class st200_document_contents.
2
Each element of the list is assigned the class st200_document_contents_item in addition to one of st200_document_contents_item1, st200_document_contents_item2 or st200_document_contents_item3 depending on the depth of the item in the list.
3
The root document element of the list is assigned the class st200_document_contents_document and all part and section elements appearing in the list are assigned the classes st200_document_contents_part and st200_document_contents_section, respectively.
5.4
document-style
5.4.1
Description
1
The document-style element specifies an additional CSS file for the given document.
5.4.2
Processing
1
The document-style element causes a link to the given CSS file to be placed in all output files generated for the given document.
5.4.3
Children
1
The document-style element may only contain text.
5.5
document-title
5.5.1
Description
1
The document-title element specifies the title of the given document.
5.5.2
CSS
1
The XHTML element generated by the document-title element is assigned the CSS st200_document_title in addition to any specified by the type attribute.
5.6
footnote
5.6.1
Description
1
The footnote element denotes sections of text that will appear at the bottom of the current page with numbered hyperlink references placed in the original text. footnote elements are numbered relative to the ancestor document. footnote elements may themselves contain footnotes.
5.6.2
Children
1
The following elements may occur as children of footnote elements:

- footnote
- image
- link
- link-external
- list-ordered
- list-unordered
- table
- term
- verbatim

2
footnote elements may also, obviously, contain text.
5.6.3
CSS
1
The footnote element causes a section to be generated at the bottom of the page. This section is assigned the class st200_footnotes. Each footnote is displayed as a form of numbered list. The number is assigned the class st200_footnote_number and the body of each footnote appears in a section with the class st200_footnote_body.
5.6.4
Example
1
This paragraph contains a footnote [4].
5.7
formal-item
5.7.1
Description
1
The formal-item element provides a means to mark certain other elements as significant. formal-item elements are numbered relative to the containing section or subsection and rendered with the given formal-item-title.
2
formal-item elements must be classified by specifying a value for the kind attribute. This allows rendering of lists of formal-item elements of a given kind using the formal-item-list element.
5.7.2
Children
1
The following elements may occur as children of formal-item elements:

- formal-item-list
- image
- list-ordered
- list-unordered
- table
- verbatim

5.7.3
CSS
1
The XHTML elements generated by the formal-item element is assigned the CSS class st200_formal_item in addition to any specified by the type attribute.
2
The title element of the generated element is assigned the class st200_formal_item_title.
5.7.4
Example
5.7.4.1. Example Formal Item
5.8
formal-item-list
5.8.1
Description
1
The formal-item-list element renders a list of all formal-item elements of the kind specified by the kind attribute.
5.8.2
CSS
1
The XHTML element generated by the formal-item-list element is assigned the CSS class st200_formal_item_list in addition to any specified by the type attribute.
2
Each element of the list is assigned the class st200_formal_item_list_item.
3
The title of the element is assigned the class st200_formal_item_list_title.
5.8.3
Example
1
A formal-item-list placed inside a formal-item:
5.8.3.1. Example Formal Item List

- 5.7.4.1. Example Formal Item
- 5.9.3.1. A Formal Item With An Unusual Title

5.8.3.2. Example Formal Item List (Examples)

- 2.1.2.1. Parsing
- 2.1.2.2. Annotation
- 2.1.2.3. Writing
- 5.8.3.1. Example Formal Item List
- 5.8.3.2. Example Formal Item List (Examples)

5.9
formal-item-title
5.9.1
Description
1
The formal-item-title element specifies the title of the given formal-item.
5.9.2
CSS
1
formal-item-title elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_formal_item_title
- st200_formal_item_title_number

5.9.3
Example
5.9.3.1. A Formal Item With An Unusual Title
5.10
image
5.10.1
Description
1
The image element inserts the image specified by the source attribute into the XHTML output. The width and height may optionally be specified with the width and height attributes, respectively. The text contents of the element are used in the XHTML if the image cannot be loaded[5].
5.10.2
CSS
1
image elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_image

5.10.3
Example
1
5.11
link
5.11.1
Description
1
The link element generates a hyperlink to the element with the given xml:id attribute (specified by the given target attribute) using the text enclosed by the link element as the hyperlink text.
2
The link element depends on the XML validator to check link integrity. The XSLT stylesheets make no attempt to verify the validity or existence of link targets.
5.11.2
Children
1
The following elements may occur as children of link elements:

- image

2
link elements may also contain text.
5.11.3
CSS
1
link elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_link

5.11.4
Example
1
The following text:

    <link s:target="elem_paragraph">paragraph</link>

Produces the following output in the context of this document: paragraph.
2
The following text:

    <paragraph><link s:target="elem_paragraph"><image s:source="strawberry.png">Strawberry</image></paragraph></link>

Produces the following output in the context of this document:
3
5.12
link-external
5.12.1
Description
1
The link-external element generates a hyperlink to an external WWW address specified by the given target attribute, using the text enclosed by the element as the hyperlink text.
5.12.2
Children
1
The following elements may occur as children of link-external elements:

- image

2
link-external elements may also contain text.
5.12.3
CSS
1
link-external elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_link_external

5.12.4
Example
1
The following text:

    <link-external s:target="http://www.io7m.com">io7m</link-external>

Produces the following output in the context of this document: io7m.
2
The following text:

    <paragraph><link-external s:target="http://www.io7m.com"><image s:source="strawberry.png">Strawberry</image></paragraph></link-external>

Produces the following output in the context of this document:
3
5.13
list-item
5.13.1
Description
1
The list-item element denotes an item in an ordered or unordered list.
5.13.2
Children
1
The following elements may occur as children of list-item elements:

- footnote
- image
- link
- link-external
- list-ordered
- list-unordered
- term
- verbatim

2
list-item elements may also contain text.
5.13.3
CSS
1
list-item elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_list_item

5.14
list-ordered
5.14.1
Description
1
The list-ordered element denotes a list of elements. The individual list items are numbered.
5.14.2
Children
1
The following elements may occur as children of list-ordered elements:

- list-item

5.14.3
CSS
1
list-ordered elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_list_ordered

5.15
list-unordered
5.15.1
Description
1
The list-ordered element denotes a list of elements. The individual list items are bulleted.
5.15.2
Children
1
The following elements may occur as children of list-unordered elements:

- list-item

5.15.3
CSS
1
list-unordered elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_list_unordered

5.16
paragraph
5.16.1
Description
1
The paragraph element denotes sections of text within a section or subsection. paragraph elements are numbered relative to the enclosing element but do not have titles.
5.16.2
Children
1
The following elements may occur as children of paragraph elements:

- footnote
- formal-item-list
- image
- link
- link-external
- list-ordered
- list-unordered
- table
- term
- verbatim

2
paragraph elements may also, obviously, contain text.
5.16.3
CSS
1
paragraph elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_paragraph
- st200_paragraph_number

5.17
part
5.17.1
Description
1
The part element denotes a significant section of a document element, of which it may appear as a child. The element must contain a series of sections.
2
part elements appear in table of contents entries, labelled with their respective part-title.
5.17.2
Processing
1
For the multi-page stylesheets, the part element creates a new output file when encountered.
5.17.3
Children
1
The following elements may occur as children of part elements:

- part-contents
- part-title
- section

5.17.4
CSS
1
part elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_part

5.18
part-contents
5.18.1
Description
1
The part-contents element specifies that a table of contents should be generated for the given part.
5.18.2
Processing
1
The table of contents appears at the start of the parent part and contains references to all the children of that element.
5.18.3
CSS
1
The CSS for part-contents elements is slightly more complex. In addition to any classes specified by the type attribute, the main list structure is assigned the class st200_part_contents. Each element of the list is assigned the class st200_part_contents_item in addition to one of st200_part_contents_item1, st200_part_contents_item2 or st200_part_contents_item3 depending on the depth of the item in the list. The root part element of the list is assigned the class st200_part_contents_part and all section and subsection elements appearing in the list are assigned the classes st200_part_contents_section and st200_part_contents_subsection, respectively.
5.19
part-title
5.19.1
Description
1
The part-title element specifies the title of the given part.
5.19.2
CSS
1
part-title elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_part_title
- st200_part_title_number

5.20
section
5.20.1
Description
1
The section element denotes a less significant section of the document than the part element, of which it may appear as a child. The element may contain either a series of subsections or a series of paragraphs.
2
section elements appear in table of contents entries, labelled with their respective section-title.
5.20.2
Processing
1
For the multi-page stylesheets, the section element creates a new output file when encountered.
5.20.3
Children
1
The following elements may occur as children of section elements:

- paragraph
- section-contents
- section-title
- subsection

5.20.4
CSS
1
section elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_section

5.20.5
Example
1
This page is contained within one section element.
5.21
section-contents

- 5.21.1. Description
- 5.21.2. Processing
- 5.21.3. CSS
- 5.21.4. Example

5.21.1
Description
1
The section-contents element specifies that a table of contents should be generated for the given section.
5.21.2
Processing
1
The table of contents appears at the start of the parent section and contains references to all the children of that element.
5.21.3
CSS
1
The CSS for section-contents elements is slightly more complex. In addition to any classes specified by the type attribute, the main list structure is assigned the class st200_section_contents. Each element of the list is assigned the class st200_section_contents_item in addition to one of st200_section_contents_item1, st200_section_contents_item2 or st200_section_contents_item3 depending on the depth of the item in the list. The root section element of the list is assigned the class st200_section_contents_section and all subsection elements appearing in the list are assigned the class st200_section_contents_subsection.
5.21.4
Example
1
The table of contents above was generated by adding a section-contents element at the beginning of the section.
5.22
section-title
5.22.1
Description
1
The section-title element specifies the title of the given section.
5.22.2
CSS
1
section-title elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_section_title
- st200_section_title_number

5.22.3
Example
1
The 'section-title' text above was specified with the section-title element.
5.23
subsection
5.23.1
Description
1
The subsection element denotes a less significant section of the document than the section element, of which it may appear as a child.
2
subsection elements appear in table of contents entries, labelled with their respective subsection-title.
5.23.2
Children
1
The following elements may occur as children of subsection elements:

- paragraph
- subsection-title

5.23.3
Example
1
This 'Example' section is a subsection containing one paragraph.
5.23.4
CSS
1
subsection elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_subsection

5.24
subsection-title
5.24.1
Description
1
The subsection-title element specifies the title of the given subsection.
5.24.2
CSS
1
subsection-title elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_subsection_title
- st200_subsection_title_number

5.24.3
Example
1
The 'Example' title of this subsection was specified with:

    <s:subsection-title>Example</s:subsection-title>

5.25
table
5.25.1
Description
1
The table element allows the specification of tabular data.
5.25.2
Children
1
The following elements may occur as children of table elements:

- table-body
- table-head
- table-summary

5.25.3
CSS
1
table elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table

5.25.4
Example
1
The following text:

    <table>
      <table-summary>Summary</table-summary>
      <table-head>
        <table-column-name>First</table-column-name>
        <table-column-name>Second</table-column-name>
        <table-column-name>Third</table-column-name>
      </table-head>
      <table-body>
        <table-row>
          <table-cell>Cell 1</table-cell>
          <table-cell>Cell 2</table-cell>
          <table-cell>Cell 3</table-cell>
        </table-row>
        <table-row>
          <table-cell>Cell 1</table-cell>
          <table-cell>Cell 2</table-cell>
          <table-cell>Cell 3</table-cell>
        </table-row>
      </table-body>
    </table>

Produces the following output in the context of this document:

First | Second | Third
--- | --- | ---
Cell 1 | Cell 2 | Cell 3
Cell 1 | Cell 2 | Cell 3

5.26
table-body
5.26.1
Description
1
The table-body element denotes the rows and cells of the parent table element.
5.26.2
Children
1
The following elements may occur as children of table-body elements:

- table-row

5.26.3
CSS
1
table-body elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table_body

5.27
table-cell
5.27.1
Description
1
The table-cell element denotes a cell in a row of a table element.
5.27.2
Children
1
The following elements may occur as children of table-cell elements:

- footnote
- image
- link
- link-external
- list-ordered
- list-unordered
- term
- verbatim

5.27.3
CSS
1
table-cell elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table_cell

5.28
table-column-name
5.28.1
Description
1
The table-column-name element allows the specification of column names for table elements.
5.28.2
CSS
1
table-column-name elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table_column_name

5.29
table-head
5.29.1
Description
1
The table-head element allows the optional specification of column names for table elements.
5.29.2
Children
1
The following elements may occur as children of table-head elements:

- table-column-name

5.29.3
CSS
1
table-head elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table_head

5.30
table-row
5.30.1
Description
1
The table-row element denotes a row of cells in a table element.
5.30.2
Children
1
The following elements may occur as children of table-row elements:

- table-cell

5.30.3
CSS
1
table-row elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_table_row

5.31
table-summary
5.31.1
Description
1
The table-summary element allows the specification of a summary for table elements.
2
The summary is required to pass XHTML Strict validity checks; it is otherwise invisible in the output.
5.32
term
5.32.1
Description
1
The term element denotes a significant element of a section of text. It is usually used to highlight or mark individual words in order to assign them a particular CSS class.
5.32.2
CSS
1
term elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_term

5.32.3
Example
1
The following text:

    <term s:type="element">ELEMENT</term>

Produces the following output in the context of this document: ELEMENT.
5.33
verbatim
5.33.1
Description
1
The verbatim element denotes a section of text in which whitespace should be preserved exactly as it was written. It is analogous to the XHTML pre element.
2
For best results, the contents of the verbatim element should be contained within an XML <![CDATA[...]]> element to prevent possible interference from the XML processor.
5.33.2
CSS
1
verbatim elements are assigned the following CSS classes in addition to any specified by the type attribute:

- st200_verbatim

[0]
There are various combinations of DocBook elements that are valid according to the schema but cannot realistically be used due to the resulting XHTML output.
[1]
http://www.w3.org/TR/xhtml1-schema/
[2]
http://www.w3.org/Consortium/Legal/
[3]
This footnote does not contain a footnote.
[4]
This footnote also contains a footnote [3].
[5]
In the alt attribute of the resulting img.