Developing XML Solutions (DV-MPS General)

[Previous] [Next]

XLink provides links similar to hyperlinks. XLink enables you to define link elements in your DTD. XLink elements can have the following attributes: type, href, role, title, show, and actuate. There are two types of XLinks, simple and extended. A simple link connects two resources: a source and a destination. An extended link connects any number of resources. In this section, let's take a look at these two types and the attributes defined in XLink in detail.

Simple Links

A declaration for a simple XLink element might look like this:

<!ELEMENT Mylink ANY> <!ATTLIST Mylink xlink:type (simple) #FIXED "simple" xlink:href CDATA #REQUIRED xlink:role NMTOKEN #FIXED "roleName" xlink:title CDATA #IMPLIED xlink:show (new |replace |embed |undefined) #FIXED "replace" xlink:actuate (onLoad |onRequest |undefined) #FIXED "onRequest" >

The attributes are defined as follows:

Extended Links

Extended links are similar to simple links, except they allow you to link to multiple links instead of just one link. An extended link consists of a set of linking resources and a set of connections between these resources. The linking resources may be local or remote. If all the resources are remote, the link is an out-of-line link. If all the resources are local, the link is an inline link. A local resource is contained in the extended link element and a remote resource is outside of the extended link element.

For more information about extended links, visit the specification Web site, at http://www.w3.org/TR/xlink/.

Категории