XML technologies / DocBook / Block elements / Callouts / Bidirectional linking
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
The previous examples linked from the callout list to markers. Links can also run in the opposite direction, from markers to explanations in the list. This requires two anchors and two back-references, as shown below.
Example: Bidirectional links between a marker and callout list
<programlisting language="python"># ...
cmd = ["file", sys.argv[1], "| cut -d',' -f2" ] <co
ANKER="co.cmd"
linkend="cl.cmd" />
# ...
</programlisting>
<calloutlist>
<callout ANKER="cl.cmd"
arearefs="co.cmd">
<para>...</para>
</callout>
</calloutlist>Replace the placeholder ANKER with id in DocBook 4 and xml:id in DocBook 5.
Line 3: Sets the marker’s anchor value.
Line 4: References the entry in the callout list.
Line 8: Sets the list entry’s anchor value.
Line 9: References the marker.
Choose a naming scheme to avoid confusing anchors and back-references.
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