Arcs

An extended link can group a set of related resources, and allow links to be made from each resource to all other resources in the group. Yet this degree of freedom is not always desirable. Some resources may not be suitable starting points, and others may be equally unsuitable as target resources from some of the starting points. The ' arc' concept provides a means for specific traversal options to be specified between resources in the group.

Arc-type elements

An arc-type element, identified by the Type attribute value 'arc', has From and To attributes to identify the starting point (or points) and ending point (or points) of a possible traversal between participating resources. But these two attributes must refer to the starting point and ending point unambiguously, by reference to a 'label' value.

The Label attribute may be used in locator-type and resource-type elements (it is not appropriate to the simple-type link, because there is already a single, implied arc from the linking markup to the targeted resource):

<localResource xlink:label="X" ... >...</localResource>

<remoteResource xlink:label="Y" ... />
<remoteResource xlink:label="Z" ... />

<arcLink xlink:type="arc" xlink:href="..."
                      xlink:from="X" xlink:to="Z"/>
<arcLink xlink:type="arc" xlink:href="..."
                      xlink:from="Z" xlink:to="Y" />



Note that as soon as at least one explicit arc is specified, the assumption that all resources connect directly to all other resources should be abandoned. In the example above, a user cannot navigate to 'X' from either 'Z' or 'Y', because there are explicit arcs present, but none of them specify these paths.

Duplicate labels

Interestingly, label values do not have to be unique within a group. For example, consider two resources that both have the label 'Z'. Any arc that targets this label will automatically target both resources. Also, any arc that starts from this label has two starting points:

...
<remoteResource xlink:label="Z" ... />
<remoteResource xlink:label="Z" ... />

<arcLink xlink:from="X" xlink:to="Z" />
<arcLink xlink:from="Z" xlink:to="Y" />



Missing From and To attributes

The To and From attributes are optional, but their absence has interesting implications.

If the From attribute is omitted, it is implied that all of the resources are starting points (even resources that have no explicit Label value still have an implied value). Even the ending point resource gains its own starting point:

...
<arcLink xlink:to="Z" />



Similarly, if the To attribute is omitted, then every resource is targeted (including the starting-point resource):

...
<arcLink xlink:from="Z" />



Arc link behaviour

An arc-type element may contain Show and Actuate attributes. In this case, these attributes suggest the behaviour for accessing the target resource when that particular arc is followed. Apart from the simple-type element, this is the only place that these attributes can be used. Note that this means it is not possible to specify such behaviours when arcs are not defined in a complex link: an XLink-sensitive application must then make its own decisions on how to present resources.

Arc roles

The Arcrole attribute defines the role of an arc, rather than the role of the target resource (or the source resource). The target resource may have a different meaning in respect to each starting point. For example, a resource describing the life of Napoleon may be the target of several arcs, including one from a resource describing his wife, and one from a resource describing the history of France. In the first case, the arc is targeting the 'husband' of the source resource. In the second case, the arc is targeting the 'emperor' of the source resource (at one point in its history). The arc roles are known as 'has' relationships (though the examples here might be better described as 'had' relationships). Josephine has a husband called Napoleon; France has an emperor called Napoleon.

This attribute may also be used in the simple-type element, to define the role of the implied arc from the link markup to the targeted resource.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.56.114