XLink turns any element into a link with attributes in the http://www.w3.org/1999/xlink 189 namespace. A simple link is a one-way link like HTML's <a>, as on the tour file's contributor. xlink:href names the target (resolved against xml:base); xlink:show says where to present it (new, replace, embed, other, none); xlink:actuate says when (onLoad, onRequest, other, none); and xlink:role, xlink:arcrole and xlink:title describe it. XLink 1.1 made xlink:type="simple" optional when xlink:href is present. The one place browsers honor XLink is SVG, where xlink:href still works but SVG 2 prefers a plain href:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="700" height="120" font-family="Arial">
<defs>
<g id="book"><rect width="70" height="96" rx="6" fill="#1565c0"/>
<rect x="10" y="12" width="50" height="10" fill="#fff"/></g>
</defs>
<use xlink:href="#book" x="20" y="10"/>
<use href="#book" x="120" y="10"/>
<a xlink:href="https://example.com/books/b3">
<text x="220" y="64" font-size="22" fill="#1565c0">Two covers drawn; this is a link</text>
</a>
</svg>
Outside SVG nothing follows XLinks for you: your code reads the attributes, typically turning them into absolute URLs with resolve-uri(@xlink:href, base-uri(.)) (xml:base) before loading them as columns.
XLink
XLink allows an element to behave like a hyperlink. It exists as a special namespace that should be declared in an ancestor element.| xlink:actuate specifies when the linked resource is read and shown. The valid values are 'onLoad', 'onRequest', 'other', and 'none'. |
| xlink:href specifies the URL of the resource. |
| xlink:show specifies where to open the link. The valid values are 'embed', 'new', 'replace', 'other', and 'none'. |
| xlink:type specifies the type of the link. The valid values are 'simple', 'extended', 'locator', 'arc', 'resource', 'title', and 'none'. |
| xlink:role, xlink:arcrole, and xlink:title describe the meaning of the resources within the context of the link. |
| xlink:label, xlink:from, and xlink:to are used for traversal. |
<?xml version="1.0" encoding="UTF-8"?>
<author xmlns:xlink="http://www.w3.org/1999/xlink"
xlink:type="simple"
xlink:href="/images/jkrowling.gif"
xlink:show="new">J. K. Rowling</author>