|Cross-referencing / Cross-referencing topics and external resources|
Cross-references can be used to link from within DITA topics to non-DITA resources, such as Web URLs, e-mail addresses, and documents stored on file servers. The scope and format attributes of the cross-reference are used to define the nature of the linked resource, and indirectly the way the link will behave.
The four most important attributes in the cross-reference (xref) element are href, type, scope and format.
When linking to non-DITA resources such as PDF files or Web addresses, the scope attribute describes whether the linked resource is treated as part of the DITA collection or external to it. This setting will ultimately determine how the HTML output code will be formed during the publishing process, and then how the browser will handle the link. The format attribute describes the type of resource being linked to.
<xref href="somefile.html" format="html" scope="local" /> <xref href="somefile.doc" format="doc" scope="external" /> <xref href="http://abc.com/intro.htm" format="html" scope="external" />