xref

xref — A cross reference to another part of the document.

Synopsis

xref ::=

  • empty

Attributes

Common attributes and common linking attributes.

Additional attributes:

  • endterm (IDREF)
  • xrefstyle

Required attributes are shown in bold.

Description

The xref element forms a cross-reference from the location of the xref to the element to which it points. Unlike link and the other cross-referencing elements, xref is empty. The processing system has to generate appropriate cross-reference text for the reader.

Processing expectations

Under ordinary circumstances, the xref points to some element with its linkend attribute and the processing system generates appropriate cross-reference text. There are three ways for the author to influence the generated text:

  1. If the endterm attribute is specified on xref, the content of the element pointed to by endterm will be used as the text of the cross-reference.

  2. Otherwise, if the object pointed to has a specified xreflabel, the content of that attribute will be used as the cross-reference text.

  3. Finally, the author may specify a keyword (or other information) in the xrefstyle attribute. Unlike endterm and xreflabel which have rigid semantics, the content of the xrefstyle attribute is simply additional information for the processing system. What effect it has, if any, is dependent on the processing system.

Attributes

Common attributes and common linking attributes.

any attribute

Any attribute in any other explicit namespace

endterm

Points to the element whose content is to be used as the text of the link

xrefstyle

Specifies a keyword or keywords identifying additional style information

Parents

These elements contain xref: abbrev, accel, acronym, address, application, arg, artpagenums, attribution, authorinitials, bibliocoverage, biblioid, bibliomisc, bibliomixed, bibliomset, bibliorelation, bibliosource, bridgehead, buildtarget, caption (db.html.caption), citation, citebiblioid, citetitle, city, classname, classsynopsisinfo, code, command, computeroutput, confdates, confnum, confsponsor, conftitle, constant, contractnum, contractsponsor, contrib, country, database, description, edition, email, emphasis (db._emphasis), emphasis (db.emphasis), entry, enumidentifier, enumitemdescription, enumname, enumvalue, envar, errorcode, errorname, errortext, errortype, exceptionname, fax, filename, firstname, firstterm (db._firstterm), firstterm (db.firstterm), foreignphrase (db._foreignphrase), foreignphrase (db.foreignphrase), funcdef, funcparams, funcsynopsisinfo, function, givenname, glosssee, glossseealso, glossterm (db._glossterm), glossterm (db.glossterm), guibutton, guiicon, guilabel, guimenu, guimenuitem, guisubmenu, hardware, holder, honorific, initializer, interfacename, issuenum, jobtitle, keycap, keycode, keysym, label, lineage, lineannotation, link, literal, literallayout, macroname, manvolnum, markup, mathphrase, member, meta (db.meta.content), methodname, modifier, mousebutton, msgaud, msglevel, msgorig, olink, option, optional, orgdiv, orgname, otheraddr, othername, package, pagenums, para, paramdef, parameter, personname, phone, phrase (db._phrase), phrase (db.phrase), pob, postcode, primary, primaryie, productname, productnumber, programlisting, prompt, property, publishername, quote (db._quote), quote (db.quote), refdescriptor, refentrytitle, refmiscinfo, refname, refpurpose, releaseinfo, remark, replaceable, returnvalue, revnumber, revremark, screen, secondary, secondaryie, see, seealso, seealsoie, seeie, seg, segtitle, seriesvolnums, shortaffil, simpara, specializedtemplate, state, street, subscript, subtitle, superscript, surname, symbol, synopsis, synopsisinfo, systemitem, tag, td, template, templatename, term, termdef, tertiary, tertiaryie, th, title, titleabbrev, tocentry, token, trademark, type, typedefname, unionname, uri, userinput, varname, volumenum, wordasword, year.

See Also

Related elements: anchor, link, olink.

Examples

 1 |<book xmlns='http://docbook.org/ns/docbook'>
   |<title>An Example Book</title>
   | 
   |<chapter xml:id="ch01"><title>XRef Samples</title>
 5 |<para>This paragraph demonstrates several features of <tag>XRef</tag>.
   |</para>
   | 
   |<itemizedlist>
   |  <listitem><para>A straight link generates the cross-reference text:
10 |    <xref linkend="ch02"/>.
   |  </para></listitem>
   |  <listitem><para>A link to an element with an 
   |    <tag class="attribute">XRefLabel</tag>:
   |  <xref linkend="ch03"/>.
15 |  </para></listitem>
   |  <listitem><para>A link with an <tag class="attribute">EndTerm</tag>:
   |    <xref linkend="ch04" endterm="ch04short"/>.
   |  </para></listitem>
   |</itemizedlist>
20 |</chapter>
   | 
   |<chapter xml:id="ch02">
   |  <title>The Second Chapter</title>
   |  <para>Some content here</para>
25 |</chapter>
   | 
   |<chapter xml:id="ch03" xreflabel="Chapter the Third">
   |  <title>The Third Chapter</title>
   |  <para>Some content here</para>
30 |</chapter>
   | 
   |<chapter xml:id="ch04">
   |  <title>The Fourth Chapter</title>
   |  <titleabbrev xml:id="ch04short">Chapter 4</titleabbrev>
35 |  <para>Some content here</para>
   |</chapter>
   |</book>