The cnxn and link tags are
used for linking to other documents. The cnxn tag is specifically used for linking to
other documents in the Connexions system, while the link tag is
used for linking to general documents on the internet.
The cnxn tag has four
attributes:
-
target - targets a
specific tag within a document -
document - targets a
specific document by its ID -
version - targets a
specific version of a document
-
strength - designates the
degree to which the linked information is related to
the current document
The
version attribute is
optional. When not specified the cnxn will default the
link to the most current version of the document. If
you specify a specific version of a document, it will
never change, meaning important parts, such as
paragraphs or figures, will not disappear without
warning. On the other hand, you will not see any updated information in that document if you specify the version.
The target and document attributes can be used
together or alone. If both are used then you will link
to a particular place in another document. If only document is used, you will link to
a document as a whole. If only target is used, you will link to a
particular tag within the current document.
The strength attribute is
optional and can give the reader an indication of how
related the additional information is to the current
discussion.
The cnxn tag does not have to have a description of
the destination in order to be used. For example,
say you want to link to a figure. You could you
use a cnxn similar to the one below:
<cnxn target='tbonefig' document="m10278"/>
The above markup will display as:
(Reference)
Notice how the display says "(Reference)". When you point to something that it not within the document, this will be the display. However, pointing to a tag within the document has a different display:
<cnxn target="element-852"/>
Figure 1
Using an empty cnxn tag like this is an easy way to point to a specific part of a document; all the numbering is done for you, and if you need to insert a new figure in the middle of the document, the numbering will change automatically.
Also, you can use your own text instead of the autogenerated text:
<cnxn target='element-852'>Momosa Picture</cnxn>
The above markup will display as:
Momosa Picture
The link tag, on the other
hand, has only a required src
tag which contains a URL for the target online document.
<para id='moretips'>
For more gardening tips, see
<link src="http://www.bhg.com/bhg/gardening/index.jhtml">Better
Homes and Gardens' Garden Section</link>.
</para>
The above markup will display as:
For more gardening tips, see Better Homes and Gardens' Garden Section.