&lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"&gt;
&lt;book&gt;&lt;title&gt;An Example Book&lt;/title&gt;
&lt;chapter id="ch01"&gt;&lt;title&gt;XRef Samples&lt;/title&gt;
&lt;para&gt;
This paragraph demonstrates several features of
&lt;sgmltag&gt;XRef&lt;/sgmltag&gt;.
&lt;/para&gt;
&lt;itemizedlist&gt;
&lt;listitem&gt;&lt;para&gt;A straight link generates the
cross-reference text: &lt;xref linkend="ch02"/&gt;.
&lt;/para&gt;&lt;/listitem&gt;
&lt;listitem&gt;&lt;para&gt;A link to an element with an
&lt;sgmltag class="attribute"&gt;XRefLabel&lt;/sgmltag&gt;:
&lt;xref linkend="ch03"/&gt;.
&lt;/para&gt;&lt;/listitem&gt;
&lt;listitem&gt;&lt;para&gt;A link with an
&lt;sgmltag class="attribute"&gt;EndTerm&lt;/sgmltag&gt;:
&lt;xref linkend="ch04" endterm="ch04short"/&gt;.
&lt;/para&gt;&lt;/listitem&gt;
&lt;/itemizedlist&gt;
&lt;/chapter&gt;

&lt;chapter id="ch02"&gt;
  &lt;title&gt;The Second Chapter&lt;/title&gt;
  &lt;para&gt;Some content here&lt;/para&gt;
&lt;/chapter&gt;

&lt;chapter id="ch03" xreflabel="Chapter the Third"&gt;
  &lt;title&gt;The Third Chapter&lt;/title&gt;
  &lt;para&gt;Some content here&lt;/para&gt;
&lt;/chapter&gt;

&lt;chapter id="ch04"&gt;
  &lt;title&gt;The Fourth Chapter&lt;/title&gt;
  &lt;titleabbrev id="ch04short"&gt;Chapter 4&lt;/titleabbrev&gt;
  &lt;para&gt;Some content here&lt;/para&gt;
&lt;/chapter&gt;
&lt;/book&gt;