<include>

Description

Permits the use of multiple BDML file documents via the inclusion of chapters.

Specifying chapters in separate BDML files allows separate direct browser loading of each BDML file and subsequent inclusion of the files into a master document for translation via the Bora document processor.

The <include> element may only be used as a direct descendant of the root <document> element or the <part> element.

When a direct descendant of the root <document> element, the included BDML file must form a complete chapter of a chapter based BDML document.

When a direct descendant of the <part> element, the included BDML file must form a complete chapter of a part based BDML document.

As included BDML files must contain a single <chapter> element within the root <document> element, they cannot themselves contain any <include> elements.

Attributes

Attribute name Description
url The url of the file to be included. This is relative to the relative root of the document.
target Include the reference document only for the specified targets.
variant Include the reference document only the variant is specified during translation.

Immediate descendants

No element descendants are defined for the <include> element.

Immediate ancestors

Element name Relation
<document> The enclosing document of a chapter based document.
<part> The enclosing part of a part based document.

Example

Part based documents with included chapters

Root document

<document xmlns="http://boradoc.org/1.0">
  <part title="Part 1 title">
    <include url="chapter1.bdml" />
    <include url="chapter2.bdml" />
  </part>
  <part title="Part 2 title">
    <include url="chapter3.bdml" />
    <include url="chapter4.bdml" />
  </part>
</document>

Included "chapter1.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 1 title">
    <-- Chapter 1 contents.. -->
    <para>Some text.</para>
  </chapter>
</document>

Included "chapter2.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 2 title">
    <-- Chapter 2 contents.. -->
    <para>Some text.</para>
  </chapter>
</document>

Included "chapter3.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 3 title">
    <-- Chapter 3 contents.. -->
    <para>Some text.</para>
  </chapter>
</document>

Included "chapter4.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 4 title">
    <-- Chapter 4 contents.. -->
    <para>Some text.</para>
  </chapter>
</document>

The above BDML renders to the following:

Part 1 title

Chapter 1 title

Some text.

Chapter 2 title

Some text.

Part 2 title

Chapter 3 title

Some text.

Chapter 4 title

Some text.

Chapter based documents with included chapters

Root document

<document xmlns="http://boradoc.org/1.0">
  <include url="chapter1.bdml" />
  <include url="chapter2.bdml" />
</document>

Included "chapter1.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 1 title">
    <-- Chapter 1 contents.. -->
    <para>Some text.</para>
  </chapter>
</document>

Included "chapter2.bdml" document

<document xmlns="http://boradoc.org/1.0">
  <chapter title="Chapter 2 title">
    <-- Chapter 2 contents.. -->
    <para>Some more text.</para>
  </chapter>
</document>

The above BDML renders to the following:

Chapter 1 title

Some text.

Chapter 2 title

Some more text.