XML namespace
XLink
The generic way to express a hyperlink in any XML vocabulary. Most visible today as xlink:href in SVG, WSDL and DocBook.
xmlns:xlink="http://www.w3.org/1999/xlink"XLink was designed as a universal linking layer for XML, with simple and extended links, arcs and traversal rules. Almost none of that was adopted; what survived is the attribute xlink:href, which several major vocabularies use for exactly the job HTML gives to href.
SVG is where most people meet it. <use xlink:href="#icon"> was the way to reference another element for years — SVG 2 deprecated it in favour of a plain href attribute, so both forms are in the wild and older renderers only understand the prefixed one.
Because the attribute is namespaced, a document using it must declare the namespace even though the attribute looks self-explanatory. Stripping an apparently unused xmlns:xlink is a reliable way to break an icon sprite.
- URI
http://www.w3.org/1999/xlink- Prefix
xlink- Elements
- Contributes attributes only
Specification: XLink 1.1
Formats that use it
SVG
<svg>A vector image format that is genuine XML, and therefore both diffable and a security surface: scripts and external references travel inside the file.
WSDL
<definitions>The machine-readable contract for a SOAP service: operations, messages, bindings and endpoints, with an inline XSD describing its own types.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.