Sample topic - cross-references

This topic shows a variety of cross-referencing methods, and the rendered results of those cross-references.

This is a paragraph in a topic, with an id attribute of sample_xref_para.


Sample Photo of Charles Darwin

Sample figure of Charles Darwin

Table 1. Sample Table of photographic credits
Photo Description Photographer
Charles Darwin Julia Margaret Cameron
Base Information Types Root Element
Concept information type concept
Task information type task
Reference information type reference
Untyped topic proto-information topic
Composite (ditabase) topic dita

Typical section

This is a typical section in a topic, and like all section elements, may be the target of a cross-reference.

This is a sample ordered list:

  1. primary
  2. secondary
  3. tertiary

Cross-references to steps in a task topic behave in a similar way.

Cross-reference samples

The following are examples of different types of cross references.
Cross-reference Code Result
To a section
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/section_Typical_Sample" type="section"/>
Typical section
To a numbered item (in an ordered list)
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/li_step2_sample" type="li"/>
2
To a step
<xref href="../Sample_Topics/t_mirage_engine_failure.dita
#sample_task_topic_short/mirage_step1" type="step" format="dita" scope="local">
1
To a figure
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/fig_sample_darwin" type="fig"/>
Figure 1
To a table
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/table_sample_photographers" type="table"/>
Table 1
To a simple table (not recommended, as not supported by many processors)
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/simpletable_sample_infotypes" type="simpletable"/>
c_Cross-references_Sample_Topic.html#concept_sample_xref__simpletable_sample_infotypes
To an image (not logical, as there is no text or number to use for the link text)
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/image_darwin" type="topic"/>
c_Cross-references_Sample_Topic.html#concept_sample_xref__image_darwin
To an image, with content in the xref
<xref href="c_Cross-references_Sample_Topic.dita
#concept_sample_xref/image_darwin" type="topic">Darwin in profile</xref>
Darwin in profile