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.

  

back to top