XML.com: XML From the Inside Out

XML.comWebServices.XML.comO'Reilly Networkoreilly.com
  Resources | Buyer's Guide | Newsletter | Safari Bookshelf
Edit and debug XSLT 1.0/2.0 and XQuery code - Download Altova XMLSpy 2005 today!
  Topics
Business
Databases
Graphics
Metadata
Mobile
Programming
Schemas
Semantic Web
Style
Web
Web Services




   Essentials
Annotated XML
What is XML?
What is XSLT?
What is XSL-FO?
What is XLink?
What is XML Schema?
What is XQuery?
What is RDF?
What is RSS?
What are Topic Maps?
What are Web Services?
What are XForms?
XSLT Recipe of the Day

Manage Your Account
Forgot Your Password?

  Find
Search
Article Archive

Add XML to your Website

  Columns
<taglines/>
Dive into XML
Hacking Congress
Hacking the Library
Java Web Services Security
Jon Udell
Perl and XML
Practical XQuery
Python and XML
Rich Salz
Sacré SVG
Standards Lowdown
The Restful Web
Transforming XML
XML Q&A
XML Tourist
XML-Deviant

  Guides
XML Resources
Buyer's Guide
Events Calendar
Standards List
Submissions List

  Toolbox

Syntax Checker





Atom Feed
RSS Feed


XML.com supported by:

Web Directory
Mortgage Refinancing

   Print.Print
Email.Email article link
Add to Project.Add to Project

What is XLink?

by Fabio Arciniegas A.
September 18, 2000
"Only connect! That was the whole of the sermon"
                 -- E. M. Forster (1879 - 1970)

The very nature of the success of the Web lies in its capability for linking resources. However, the unidirectional, simple linking structures of the Web today are not enough for the growing needs of an XML world. The official W3C solution for linking in XML is called XLink (XML Linking Language). This article explains its structure and use according to the most recent Candidate Recommendation (July 3, 2000).

Overview

Every developer is familiar with the linking capabilities of the Web today. However, as the use of XML grows, we quickly realize that simple tags like <A HREF="elem_lessons.html">Freud</A> are not going to be enough for many of our needs.

Table of Contents

Introduction
An Example XLink
XLink Reference
  •The XLink Type Attribute
  •XLink Types: Use and
   Composition
  •Simple Links
Tools and References
Conclusion

Consider, for example the problem of creating an XML-based help system similar to ones used in some PC applications. Among other things (such as displaying amusingly animated characters), the system might be capable of performing the following actions when a user clicks on a topic:

  • Opening an explanatory text (with a link back to the main index)
  • Opening a window and simulate the actions to be taken (e.g., going to the "Edit" menu and pressing "Include Image")
  • Opening up a relevant dialog (e.g, a file chooser for the image to include)

Trying to code something like this (links with multiple targets, directions, and roles) in XML while having old "<a href..." in mind is confusing, and leads people to questions like the following:

  • What is the "correct" tag for links in XML?>
  • If there is such a magic element, how can I make it point to more than one resource?
  • What if I want links to have different meanings relevant to my data? E.g., the "motherhood" and "friendship" relationships between two "person" elements

In answer to these and many other linking questions, this article describes the structure and use of XLink. The article is composed of three parts: a brief example that illustrates the basics of the language, a complete review of the structure of XLink, and a list of XLink-related resources. The resources include some XSLT transformations that enable your HTML output to simulate required XLink behavior on today's browsers.

Pages: 1, 2, 3

Next Pagearrow


Sponsored By:



Contact Us | Our Mission | Privacy Policy | Advertise With Us | | Submissions Guidelines
Copyright © 2005 O'Reilly Media, Inc.