[Previous] [Contents] [Next]

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:

  • type Specifies whether the link is simple or extended.
  • href Refers to the URI of the other end of the link. This can be an entire document, or it can be a point or an element in a document. An XPointer can be used to identify a point in the document.
  • role Describes the function of the other end of the link. There are no predefined role values. You can create your own roles that will be interpreted by your applications to define different types of XLink. For more information on roles, see the W3C specification at http://www.w3c.org/TR/2000/WD-xlink-20000221/.
  • title The title attribute is the same as the HTML link title. It can be used to display floating tips or a default value when the link cannot be displayed.
  • show If no style sheet is used, the show attribute will tell the application what to do with the link. The embed value causes the content of the link target to be embedded in the content of the link source. The replace value causes the content of the link source to be replaced by the content of the link target. The new value creates a new instance of the application containing the linked document. An undefined value means there is no defined behavior for this link.
  • actuate Specifies when the link should be activated. The onRequest value indicates that the application will wait for the user to request that the link be followed. The onLoad value causes the link to be followed immediately. The onRequest value behaves like the HTML a element; onLoad behaves like the img element.

[Previous] [Contents] [Next]