Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XLink
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Linking with XLink== XLink defines a set of [[Attribute (computing)#XML|attributes]] that may be added to elements of other [[XML namespaces]]. XLink provides two kinds of hyperlinking for use in XML documents. '''Simple links''' connect only two resources, similar to [[HTML]] links. '''Extended links''' can link an arbitrary number of resources. ===Simple links=== A '''simple link''' creates a unidirectional [[hyperlink]] from one element to another via a [[Uniform Resource Identifier|URI]]. Example: <syntaxhighlight lang=xml><?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>Here is <anchor xlink:type="simple" xlink:href="#someHeading">a link</anchor> to the header.</para> <para>It is an anchor that points to the element with the id "someHeading" on the current page.</para> </document></syntaxhighlight> ===Extended links=== '''Extended links''' allow multiple resources, either remote or local, to be connected by multiple arcs. An '''arc''' is information about the origin, destination and behavior of a link between two resources. The origin and destination resources are defined by labels. By using one or more arcs, an extended link can achieve specific sets of connections between multiple resources. For example, if all resources in an extended link were given the label <var>A</var>, then an arc within that link declaring <code>from="<var>A</var>", to="<var>A</var>"</code> would form connections between all 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 supplementary information with resources without editing those resources. XLink also supports richer information about link types and the roles of each resource in an arc.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)