Schema Documentation - Newsfeed Aggregator Profile
version 1.0

The block variant of the code element

On this page:

The code element is intended for general instances of code as found in works of fiction and similar non-technical documents, which includes computer programming code, commands and command input/output as well as representations of numeric and text coding systems, such as Morse code.

For computer programming books, manuals and specifications, specializing the code element or using a computer markup feature is recommended.

Usage Example

<code>
    <lngroup>
        <ln>public static void helloWorld() {</ln>
        <ln>    Console.Write("Hello World!");</ln>
        <ln>}</ln>
    </lngroup>
</code>
    

Allowed parents

address, annotation, block, body, caption, description, item, d:longdesc, object, quote, section, d:simplifiedLanguageDescription, d:summary, td, th and d:tour

Allowed children

This element must not contain text.

This element may contain the following children: block, hd, ln, lngroup, object and p

Content model and additional requirements

a choice of
either
one or more of
any of the 2 elements: ln and lngroup
or
one or more of
any of the 4 elements: block, hd, object and p
end of choice
Note that in addition to restrictions presented in the content model above, use of this element must also respect the following requirement:
  • The code element must neither be empty nor contain only whitespace.
Such requirements take precedence over any conflicting statements in the content model or in the lists above of allowed children and parents.

Variants

This element exists in 2 variants. The other variant is the phrase variant.

Namespace

http://www.daisy.org/ns/z3998/authoring/