The link tag is used to insert links to
internal or external locations or resources.
This CNXML:
<para id="linkexample">
There are many ways to grill
<link document="m10275" version="2.1">a good
steak</link>. My favorite can be found
<link url="http://en.wikibooks.org/"
window="new">on Wikibooks</link>.
</para>
Results in this display:
There are many ways to grill a good steak.
My favorite can be found on Wikibooks.
Links must provide a target, so one of the following attributes
must be defined: "url", "document", "target-id", "resource", or "version".
Starting with version 0.6, the CNXML language does not permit URLs that contain
ampersand (&) characters (i.e., http://cnx.org/example?i=1
&p=2).
Check all URLs and replace any ampersands with the entity
reference "&". More information can be found on the
W3C's page.
-
url (conditional):
A Web path being linked to. Verify that the location is stable and will not change. You cannot use the "url" attribute in
combination with the "document", "target-id", "resource", or "version" attributes.
-
document (conditional):
The id of the module or collection being linked to (default is the present module).
-
target-id (conditional):
The id of an element in a module or collection, such as a section or an image (default is the root element of the target module
or collection). Can refer to an element in the present module or, alternately, an element on a separate module if the
"document" attribute has been specified. You cannot use the "target-id" attribute in combination with the "resource" attribute.
-
resource (conditional):
The name of a resource, such as a supplemental PDF or text document (default is nothing). The resource must be a part of the
present module or, if the "document" attribute has been specified, must be part of the target module.
-
version (conditional):
The version of the module or collection being linked to (default is the latest version of the module or collection). Can refer
to the module you are on or, alternately, a separate module or collection if the "document" attribute has been specified.
-
window (optional):
Possible values:
- replace - The code will navigate to the reference URL in the same current window (default).
- new - The code will be navigate to the reference URL in a new window
-
strength (optional):
Possible values:
- 1 - Sets link strength to 1 (the weakest)
- 2 - Sets link strength to 2 (medium strength)
- 3 - Sets link strength to 3 (the strongest)
-
id (optional):
A unique identifier, whose value must begin with a letter and contain only letters,
numbers, hyphens, underscores, colons, and/or periods (no spaces).
term,
cite,
cite-title,
foreign,
emphasis,
sub,
sup,
code,
preformat,
quote,
note,
list,
media,
footnote,
link,
newline,
space, Unicode text
preformat,
para,
title,
label,
cite,
cite-title,
link,
emphasis,
term,
sub,
sup,
quote,
foreign,
footnote,
note,
item,
code,
caption,
commentary,
meaning,
entry