XML technologies / DocBook / Cross-references and links / Internal cross-references / Additional options for DocBook 5
(Excerpt from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" by Thomas Schraitle)
The preceding references are also allowed in DocBook 5. Simply replace the attribute id with xml:id.
In DocBook 5, the element xref is not essential for internal cross-references. The attribute linkend is now allowed everywhere and turns any element into a cross-reference. The following example shows the code.
Example: Reference using the attribute linkend
<para>Des Weiteren gibt es <acronym linkend="chap.xml">XML</acronym>, die eXtensible Markup Language...</para>
...
<chapter xml:id="chap.xml">
<title>XML</title>
<para> ... </para>
</chapter>The advantage is that any element can become a cross-reference. When should you use the attribute linkend and when should you avoid it? Some guidance:
Prefer
xrefif you want custom or automatically generated reference text.Some output formats do not allow readers to follow a reference. In (X)HTML, the element carrying the
linkendattribute becomes a clickable link. In PDF, readers see only the text without a page number, section number or similar context.Use
linkendonly on inline elements. Although the attribute is allowed on block elements, the result is undefined and may be undesirable. Future DocBook stylesheets may support this, but it was not recommended when this book was written.
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