XLink
From Wikipedia, the free encyclopedia
The XML Linking Language, or XLink, is an XML markup language used for creating hyperlinks in XML documents. XLink is a W3C specification that outlines methods of describing links between resources in XML documents, whether internal or external to the original document.
Contents |
[edit] The XLink specification
XLink 1.0 remains the current version of XLink where it received W3C Recommendation status on 2001 June 27.[1] XLink 1.1 entered W3C Candidate Recommendation status on 2006 March 28.[2]
[edit] Linking with XLink
XLink defines a set of attributes that may be added to elements of other XML namespaces. XLink provides two kinds of hyperlinking for use in XML documents. Extended links are out–of–band hyperlinks that, in a linkbase document, can link resources over which the link editor has no control. Simple links offer similar functionality to HTML links, which are in–band links.
[edit] Simple links
A simple link is similar to those native to HTML; it simply creates a unidirectional hyperlink arc from one element to another via a URI. Example:
<?xml version="1.0"?> <document xmlns="http://example.org/xmlns/2002/document" xmlns:xlink="http://www.w3.org/1999/xlink"> <heading id="someHeading">Some Document</heading> <para>The <anchor xlink:type="simple" xlink:href="#someHeading">Some Document</anchor> header.</para> </document>
[edit] Extended links
The XLink specification supports not only simple links but also extended links. Extended links allow multiple resources, either remote or local, to be connected by multiple arcs. Arcs are explicitly unidirectional — they only define traversal in a single direction. By grouping resources with labels and using one or more arcs, an extended link can achieve specific traversal pathways among the resources.
For example, if all resources in an extended link were given the label A, then an arc within that link which was from="A", to="A"
would connect every resource to every other resource and allow traversal from any of those resources to any other of those resources.
Extended links do not need to be contained in the same document as the elements they link to. This makes it possible to associate metadata or other supplemental information with resources without editing those resources.
XLink also supports richer information about link types and the roles for each resource that an XLink connects.
[edit] Uses of XLink
Software support for XLink, as of 2006 June, includes the following:
[edit] Mozilla Firefox
Mozilla Firefox (1.5.0) has very limited support for simple XLinks.
- Links with an
xlink:show="embed"
attribute do not work. - Links with an
xlink:actuate="onLoad"
attribute work if they are the only thing on the page. - All other links open the target in the current window, when requested, irrespective of the presence of
xlink:actuate
orxlink:show
attributes. - In XML documents XLinks cannot be applied to elements in the XHTML namespace (Firefox 2.0)
[edit] Netscape
Netscape (7.2) has the same support for simple XLinks as Firefox, except that the xlink:show="new"
attribute works correctly.
[edit] SVG applications
Hypertext links in SVG can currently be defined as XLink simple links.[3] The W3C Working Draft of SVG 1.2 proposes using XLink extended links as well.[4]
[edit] RDDL
The XML language RDDL, an extension to XHTML Basic that is used to describe XML Namespaces, uses XLink simple links.
[edit] XBRL
The Extensible Business Reporting Language (XBRL) has used XLink simple and extended links since the XBRL 2.0 specification was published in 2001. Most large XBRL taxonomies contain extensive linkbases. As of 2006, XBRL is probably the most extensive use of XLink in production systems.
[edit] References
- ^ "XML Linking Language (XLink) Version 1.0", W3C, June 8, 2006.
- ^ "XML Linking Language (XLink) Version 1.1", W3C, June 8, 2006.
- ^ "Scalable Vector Graphics (SVG) 1.1 Specification: Linking", W3C, June 8, 2006.
- ^ "Extended Links (SVG 1.2)", W3C, June 8, 2006.
[edit] External links
- W3C Recommendation
- XLink: Who Cares?
- XML Linking Implementations (Last Updated 2000)
- Demo of XLinks for Mozilla browsers
|