10.3 Link Semantics

     

A link describes a connection between two resources. These resources may or may not be XML documents; but even if they are XML documents, the relationships they have with each other can be quite varied. For example, links can indicate parent-child relationships, previous- next relationships, employer-employee relationships, customer-supplier relationships, and many more. XLink elements can have xlink:title and xlink:role attributes to specify the meaning of the connection between the resources. The xlink:title attribute contains a small amount of plain text describing the remote resource such as might be shown in a tool tip when the user moves the cursor over the link. The xlink:role attribute contains a URI that somehow indicates the meaning of the link. For instance, the URI http://www.isi.edu/in-notes/iana/assignments/media-types/text/css might be understood to mean that the link points to a CSS stylesheet for the document in which the link is found. However, there are no standards for the meanings of role URIs. Applications are free to assign their own meaning to their own URIs.

For example, this book element is a simple XLink that points to Scott's author page at O'Reilly. The xlink:title attribute contains his name , while the xlink:role attribute points contains the URI for the Dublin Core creator property, thereby indicating he's an author of this book.

 <book xlink:type="simple"  xlink:href="http://www.oreillynet.com/cs/catalog/view/au/751"  xlink:title="W. Scott Means  "  xlink:role="http://purl.org/dc/elements/1.1/creator" >  XML in a Nutshell </book> 

As with almost everything else related to XLink, exactly what browsers or other applications will do with this information or how they'll present it to readers remains to be determined.



XML in a Nutshell
XML in a Nutshell, Third Edition
ISBN: 0596007647
EAN: 2147483647
Year: 2003
Pages: 232

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net