What is the key role of xml links? How can we use...
1 posts in topic
Flat View  Flat View

Posted By:   Srinivas_Thutika
Posted On:   Tuesday, June 6, 2000 05:39 PM

Re: What is the key role of xml links? How can we use...

Posted By:   Rammohan_Meda  
Posted On:   Thursday, March 29, 2001 10:33 AM

In the official terminology of the XLink proposal, a link is an explicit relationship between two or more data objects or portions of data objects.

XLink and XPointer are two components of XML Linking Language (XLL) specification, which is currently a working draft at the W3C.

XLL Roles:

1. Bi-directional linking

2. Filtered views of data

3. Persistent links that have semantics attached to them

4. Dynamic document assembly

5. Create links from documents you can't edit

6. Publish dynamic updates or software patches

7. Support annotations

8. Manage links so that they don't break

9. Establish links as first-class citizens.

XLink works by proving you with global attributes you can use to mark your elements as linking elements. In order to use linking elements, the declaration of the XLink namespace is required


The XLink type attribute

The type attribute may have one of the following values:

· simple: a simple link

· extended: an extended, possibly multi-resource, link

· locator: a pointer to an external resource

· resource: an internal resource

· arc: a traversal rule between resources

· title: a descriptive title for another linking element

XLink Types: Use and Composition

Let's review each of the XLink types. use an example of linking actresses and the movies they played in.

Resources (resource-type and locator-type elements)

The resources involved in a link can be either local (resource-type elements) or remote (pointed to by locator-type elements

xlink:type (resource) #FIXED "resource"
xlink:title CDATA #IMPLIED
xlink:label NMTOKEN #IMPLIED>
xlink:role CDATA #IMPLIED

The element has another two XLink-based attributes besides xlink:type.
1. "title," - semantic attribute - to give a short description of the resource.

2. "label," - traversal attribute - to identify the element

3. "role," - for describing a property of the resource.

An actress element may look like the following:


It is important to note also that the subelements of resource-type elements (here, the first_name and surname elements) have no significance for XLink

As mentioned before, remote resources are pointed to by locators. Here is the DTD for a locator-type element:

xlink:type (locator) #FIXED "locator"
xlink:title CDATA #IMPLIED
xlink:role CDATA #IMPLIED
xlink:label NMTOKEN #IMPLIED
xlink:href CDATA #REQUIRED>

Locators can have the same attributes as resources (i.e., title, label, and role), plus a required href semantic attribute, which points to the remote resource. A locator movie element will look like the following:

Navigation rules (arc-type elements)

The relationships between resources involved in a link are specified using arcs. Arc-type elements (i.e. those with xlink:type="arc") use the "to" and "from" attributes to designate the start and end points of an arc:

Apart from the traversal attributes "to" and "from," arcs may include the following:

show, title, actuate, arcrole

The following DTD will illustrate the above attributes:

xlink:type (arc) #FIXED "arc"
xlink:title CDATA #IMPLIED
xlink:show (new | replace |
embed | other | none)

Putting together our resource and locator examples with this arc, we have the following snippet of an XML instance:


To encapsulate relationships like the above we need containers, that is, extended-type XLink elements

Extended links (extended-type elements)
Extended links are marked by the type "extended" and may contain locators (pointing to remote resources), local resources, arcs, and a title. One can simply consider the extended-link elements as meaningful wrappers that provide a nest for resources and arcs:

xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink"
xlink:type (extended) #FIXED "extended"
xlink:title CDATA #IMPLIED>

Putting together all the previous elements, we finally have a complete and valid extended link




To find moreinfo on Xlink specification, please refer the following link.


Note: because of some HTML problems, I didn't put "!" mark before ELEMENT and ATTLIST inthis document, user requested to notice this while reading.
About | Sitemap | Contact