Roles

A 'role' can be assigned to a locator, and is used by the system to apply a different style to the linking element content, or to affect linking behaviour in some way. For example, if all links are classified as 'internal' (referring to objects in the same document) or 'external', then these links can be given different colours so that users will be aware of the distinction.

The Role attribute is used to create these categories. While a browser may simply use the attribute value to apply different styles to the linking text (both CSS and XSLT are able to apply different styles to an element, depending on the value of one of its attributes), a more specialized browser may perform role-specific actions as well.

The value of this attribute must be an absolute URL that is meant to point to a document that explains the purpose of the role. While this is a good idea in principle, the draft standard makes no comment on whether or not the existence of such a document is critical, or even on the format of the contents of this document if it does exist. The standard does not even suggest whether an XLink application should attempt to find and read the document, or make any deductions based on its contents. Perhaps the intent is for the application to simply show the document to a user upon request. But it could also be assumed that the document is optional, and that the URL is simply used to supply a unique identifier text string for the role (just as URLs are used in the Namespaces standard):

<!ATTLIST simpleLink ...
                     xlink:role CDATA #IMPLIED>

   ... are you going to
   <simpleLink xlink:href="#Sca"
               xlink:role="file:///describe">
   Scarborough
   </simpleLink> fair?

Perhaps in the next draft, or in the final release of the standard, there will be a number of typical roles defined, along with URLs that will be understood and interpreted intelligently by most XLink applications.

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

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