[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
XML is centered around the idea of documents, but many scenarios go beyond single documents and link various documents to represent a more comprehensive dataset. XML itself has little support for linking documents, but mechanisms such as xml:id
, XML Inclusions (XInclude), XML Linking Language (XLink), and the Resource Description Framework (RDF) can be used to overlay linking semantics without having to start from scratch.
link microformatfor XML
and while we're at it, we might as well turn the Web into a proper hypermedia system!
IDnessof an attribute is established by its name
xml:id
uses XML's own namespace to identify identifiershttp://www.w3.org/XML/1998/namespace
[http://www.w3.org/XML/1998/namespace] contains a mix of various specs<section id="introduction">
<section xml:id="introduction">
<x xmlns:xi="http://www.w3.org/2001/XInclude"> <xi:include href="something.xml"/> <xi:include xpointer="xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(x/xi:include[1])" parse="xml"/> </x>
<!ELEMENT xi:include (xi:fallback?)> <!ATTLIST xi:include xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" href CDATA #IMPLIED parse (xml|text) "xml" xpointer CDATA #IMPLIED encoding CDATA #IMPLIED accept CDATA #IMPLIED accept-language CDATA #IMPLIED >
<a xlink:href="…" [ xlink:actuate="onRequest" xlink:show="replace" ] xlink:type="simple" > … </a>
<a xlink:href="…" [ xlink:role="…" xlink:arcrole="…" xlink:title="…" ] xlink:type="simple" > … </a>
onLoad
instructs to traverse the link as soon as the starting resource is displayedonRequest
waits for link traversal until a user has initiated link traversalother
allows markup extensions, none
specifies that there is no additional informationnew
specifies that a new presentation context is be created (e.g., a new window)replace
specifies that the target resource replaces the current resourceembed
specifies that the target resource replaces the starting resource fragmentother
allows markup extensions, none
specifies that there is no additional informationhttp://www.w3.org/1999/xlink/properties/linkbase
<environment xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="extended"> <artist xlink:type="locator" xlink:role="artist" xlink:href="modigliani.xml"/> <influence xlink:type="locator" xlink:label="inspiration" xlink:href="cezanne.xml"/> <influence xlink:type="locator" xlink:label="inspiration" xlink:href="lautrec.xml"/> <influence xlink:type="locator" xlink:label="inspiration" xlink:href="rouault.xml"/> <history xlink:type="locator" xlink:label="period" xlink:href="paris.xml"/> <history xlink:type="locator" xlink:label="period" xlink:href="kisling.xml"/> <bind xlink:type="arc" xlink:from="artist" xlink:to="inspiration"/> <bind xlink:type="arc" xlink:from="artist" xlink:to="period"/> </environment>
Parent Type | Significant Child Types |
---|---|
simple | none |
extended | locator, arc, resource, title |
locator | title |
arc | title |
resource | none |
title | none |
simple | extended | locator | arc | resource | title | |
---|---|---|---|---|---|---|
type | ● | ● | ● | ● | ● | ● |
href | ○ | ● | ||||
role | ○ | ○ | ○ | ○ | ||
arcrole | ○ | ○ | ||||
title | ○ | ○ | ○ | ○ | ○ | |
show | ○ | ○ | ||||
actuate | ○ | ○ | ||||
label | ○ | ○ | ||||
from | ○ | |||||
to | ○ |