DocBook: The Definitive Guide

docbook: the definitive guide
By Norman Walsh & Leonard Muellner
1st Edition October 1999
1-56592-580-7, Order Number: 5807
652 pages, $36.95 , Includes CD-ROM

DocBook: The Definitive Guide
PrevNext

Name

XRef -- A cross reference to another part of the document

Synopsis

Content Model

XRef ::= EMPTY

Attributes

Common attributes

Name

Type

Default

LinkendIDREFRequired
EndtermIDREFNone

Tag Minimization

The start-tag is required for this element. The end-tag is optional, if your SGML declaration allows minimization.

Parameter Entities

%ndxterm.char.mix;%para.char.mix;%programlisting.content;
%refinline.char.mix;%screen.content;%tbl.entry.mdl;
%title.char.mix;%xref.char.class;

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

If the Endterm attribute is specified, the content of the element pointed to by Endterm must be used as the text of the cross-reference, otherwise it is up to the application to generate appropriate cross reference text from the element pointed to by Linkend.

If the object pointed to has a specified XRefLabel, that should be used as the cross-reference text.

Parents

These elements contain XRef: Application, Attribution, BiblioMisc, BridgeHead, Citation, CiteTitle, Comment, Emphasis, entry, ForeignPhrase, GlossSee, GlossSeeAlso, GlossTerm, LineAnnotation, Link, LiteralLayout, LoTentry, Member, MsgAud, OLink, Para, Phrase, Primary, PrimaryIE, ProductName, ProgramListing, Quote, RefEntryTitle, RefPurpose, Screen, ScreenInfo, Secondary, SecondaryIE, See, SeeAlso, SeeAlsoIE, SeeIE, Seg, SegTitle, SimPara, Subtitle, Synopsis, Term, Tertiary, TertiaryIE, Title, TitleAbbrev, ToCback, ToCentry, ToCfront, ULink.

Children

In some contexts, the following elements are allowed anywhere: BeginPage, IndexTerm.

Attributes

Endterm

Endterm points to the element whose content is to be used as the text of the link.

Linkend

Linkend points to the target of the cross reference.

See Also

Anchor, Link, OLink, ULink

Examples

Consider the following example:

<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <book><title>An Example Book</title> <chapter ><title>XRef Samples</title> <para> This paragraph demonstrates several features of <sgmltag>XRef</>. </para> <itemizedlist> <listitem><para>A straight link generates the cross-reference text: <xref linkend="ch02">. </para></listitem> <listitem><para>A link to an element with an <sgmltag >XRefLabel</sgmltag>: <xref linkend="ch03">. </para></listitem> <listitem><para>A link with an <sgmltag >EndTerm</sgmltag>: <xref linkend="ch04" endterm="ch04short">. </para></listitem> </itemizedlist> </chapter> <chapter >   <title>The Second Chapter</title>   <para>Some content here</para> </chapter> <chapter  xreflabel="Chapter the Third">   <title>The Third Chapter</title>   <para>Some content here</para> </chapter> <chapter >   <title>The Fourth Chapter</title>   <titleabbrev >Chapter 4</titleabbrev>   <para>Some content here</para> </chapter> </book>

One reasonable rendering for the content of the first chapter of this book is the following:

This paragraph demonstrates several features of XRef.

Of course, in an online system, these references would also be links to the appropriate chapters.

For additional examples, see also Part.


PrevHomeNext
WordAsWordUpYear

Back to: DocBook: The Definitive Guide


O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 1999, O'Reilly & Associates, Inc.



DocBook. The Definitive Guide
DocBook 5: The Definitive Guide
ISBN: 0596805020
EAN: 2147483647
Year: 1999
Pages: 412
Authors: Walsh Norman, Richard L. Hamilton
BUY ON AMAZON

Similar book on Amazon
DocBook XSL: The Complete Guide (4th Edition)
DocBook XSL: The Complete Guide (4th Edition)
XSLT, 2nd Edition
XSLT, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XSLT Cookbook: Solutions and Examples for XML and XSLT Developers, 2nd Edition
XML: Visual QuickStart Guide (2nd Edition)
XML: Visual QuickStart Guide (2nd Edition)

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net