Boost C++ Libraries

PrevUpHomeNext

Chapter 12. Block Level Elements

Table of Contents

xinclude
Paragraphs
Lists
Ordered lists
List Hierarchies
Long List Lines
Unordered lists
Mixed lists
Paragraphs in lists
Explicit list tags
Code
Escaping Back To QuickBook
Preformatted
Blockquote
Admonitions
Headings
Generic Heading
Macros
Predefined Macros
Templates
Blurbs
Tables
Variable Lists
Include
Import
Plain blocks

You can include another XML file with:

[xinclude file.xml]

This is useful when file.xml has been generated by Doxygen and contains your reference section.

xinclude paths are normally used unchanged in the generated documentation, which will not work if you wish them to be relative to the current quickbook file. Quickbook can add a xml:base attribute to the boostbook documentation to specify where xinclude files should be found. For example, if you wish them to be relative to the current quickbook file:

[article Article with xincludes
[quickbook 1.7]
[xmlbase .]
]

[xinclude file.xml]

Now the xinclude should work if file.xml is in the same directory as the quickbook file. Although it might not work if you distribute the generated files (as their relative directories can change).

Say the article is generated in a sub-directory, by running something like:

quickbook article.qbk --output-file=output/article.xml

This will generate a boostbook root tag:

<article id="article_with_xincludes"
    last-revision="$Date: 2013/08/20 08:26:48 $"
    xml:base=".."
    xmlns:xi="http://www.w3.org/2001/XInclude">

Because xml:base is set to .., the xml processor will know to look in the parent directory to find file.xml, which it comes across the xi:include tag.


PrevUpHomeNext