XLink: Extended Links
A simple link connects a local resource to a remote resource.
Extended links connect any number of resources, local or remote.
You specify the relationships between the resources, such as direction.
For example, suppose your application has many drop-down menus such as:
Select a publication...
Revista Nexos
Revista Proceso
EZLN
This example is not the usual one-to-one link ubiquitous on the web. Rather, it connects the local resource to
several
remote resources:
It could be coded as follows:
(
You could set defaults in the DTD to avoid having to repeat all attributes
).
Remember, XLink is a language, not an application. How links are actually implemented depends on the application.
Extended links can contain three types of elements (defined by
xlink:type
):
resource
: Specifies a local resource. Attributes:
xlink:label
- Identifies the resource.
xlink:title
- A human-readable title.
locator
: Specifies a remote resource. Attributes:
xlink:href
- Specifies the resource's location.
xlink:label
- Identifies the resource.
xlink:title
- A human-readable title.
arc
: Specifies resource relationships. Attributes:
xlink:from
- Identifies the starting resource.
(A previously-defined
label
for a local or remote resource).
xlink:to
- Identifies the ending resource.
(A previously-defined
label
for a local or remote resource).
xlink:show
- (
new|replace|embed
)
xlink:actuate
- (
onRequest|onLoad
)
xlink:title
- A human-readable title.
Lab 5C