XML technologies / DocBook / Block elements / Graphics / Graphics outside the text flow (block)
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
For graphics that should appear between paragraphs, for example, use the element mediaobject. It contains one or more imagedata elements, usually containing different formats of the same graphic. One is chosen according to the target format. The example below has two entries, for HTML and FO. The DocBook stylesheets select the appropriate format for the target.
Example: Alternative graphic objects in mediaobject
<mediaobject>
<imageobject role="html">
<imagedata fileref="mygraphic.png"/>
</imageobject>
<imageobject role="fo">
<imagedata fileref="mygraphic.pdf"/>
</imageobject>
</mediaobject>Line 1: Container for alternative graphic objects
Line 2: PNG graphic for HTML
Lines 3 and 6: Reference the appropriate graphic. This element also permits attributes controlling size and alignment.
Line 5: PDF graphic for XSL-FO
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top