XML technologies / DocBook / Cross-references and links / Linking with XLinks / Internal XLinks
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
As in (X)HTML, internal XLinks require a fragment identifier. This is simply a hash sign (#) followed by the content of the xml:id attribute.
Example: Internal cross-references as XLink
<para>Weitere Informationen, siehe <xref xlink:href="#chap.intro"/>.</para>
...
<chapter xml:id="chap.intro">
<title>XML, DTDs und Schemata</title>
<para> ... </para>
</chapter>Note: Internal cross-references in XLinks are not checked
Fragment identifiers are not checked during validation because the source has type anyURI. However, the XML parser requires type IDREF to check internal references. This is not an error, merely a different notation. Consequently, errors such as typos become apparent only during transformation. To check internal cross-references, use the attribute linkend instead of the fragment identifier; see Internal cross-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