Title: XLink
1XLink
- Van Lepthien
- CSCI 7818
- Fall 2000
2Overview
- What is XLink?
- W3C Stuff
- XLink Elements
- Linkbases
- Traversals
- Implementations
- Comments
- References
3What is XLink?
- XLink allows elements to be inserted into XML
documents in order to create and describe links
between resources.
4What is XLink?
- Define link relationships among more than two
resources. - Associate metadata with a link
- Define links to associate resources not in the
document containing the link
5What is XLink?
- Enables hyperwebs
- (this slide for Kens benefit)
6W3C Stuff
- XML XLink Requirements Version 1.0 W3C Note
24-Feb-1999(http//www.w3.org/TR/NOTE-xlink-req/
) - Candidate Recommendation 3 July 2000 XML
Linking Language (XLink) Version 1.0 -
(http//www.w3.org/TR/xlink/) - Namespacexmlnsxlinkhttp//www.w3.org/1999/xli
nk
7XLink Scope
- Element Conformance
- Application Conformance
8Element Conformance
- An element contains a type attribute from the
XLink namespace with a value of arc,
extended, locator, resource, simple,
title, or none. - An element adheres to the specified constraints
for the type. - XLink does not define elements.
- It defines attributes and how the containing
elements are to be used.
9 Application Conformance
- The recommendation describes processing that an
application must do to conform, and, if optional
features are implemented, what must be done to
make the optional features conform.
10XLink Element Types
- Links
- simple
- extended
- Resources (used in extended links)
- resource (local resource)
- locator (remote resource)
- arc (used in extended links)
- title (may be in a child element of an extended-,
locator- or arc-type element) - none
11Link - simple
- Defines an outbound link from a local resource to
a remote resource. - Similar to HTML references
- lta hrefurigt lt/agt or ltimg hrefurigt
- Attributes
- href URI of a resource. Xpointer support is
explicitly expected. - role URI of a resource that describes the role
of the element - arcrole URI of a resource that describes the
role of the link - show describes how the href resource is to be
presented on transversal - actuate describes when the transversal to href
resource is to happen - title a human readable description of the
element
12simple - Link Example
XML Document ltdoc xmlnsxlink/xlinkgt ltmyta
g xlinktypesimple xlinkrolerole_uri
xlinkhrefref_uri xlinkshownew
xlinkactuateonLoadgt lt/mytaggt lt/docgt
Role definition
Linked resource
Instruction to open the link in a new window when
the link is traversed
Instruction to traverse the link when loading the
original document
13Link - extended
- An extended link associates an arbitrary number
of resources. - An extended link may be stored separately from
all resources that are being associated. - Enables linking of objects that have no provision
of internal links.
14Link - extended
- A link element with XLink typeextended
contains a set of elements with XLink types of
resource, locator, arc, and title.
15resource
- An element with XLink typeresource defines a
local resource. - Attributes
- role URI of a resource that describes the role
of the element - title a human readable description of the
element - label provides a label to which an arc type
element may refer
16locator
- An element with XLink typelocator defines a
remote resource. - Attributes
- href URI of a resource (required)
- role URI of a resource that describes the role
of the element - title a human readable description of the
element - label provides a label to which an arc type
element may refer
17arc
- An element with XLink typearc defines links
between (or among) resources. The links can be - between a location in the document and a remote
resource (an outbound arc) - between a remote resource and a location in the
document (an inbound arc) - between remote resources (a remote arc)
18arc
- Attributes
- from specifies the label of starting resources
for a transversal - to specifies the label of ending resources for
a transversal - show describes how the href resource is to be
presented on transversal - actuate describes when the transversal to href
resource is to happen - arcrole URI of a resource that describes the
role of the arc - title a human readable description of the
element
19title
- An element with XLink typetitle permits more
information than a title attribute alone would. A
title element must be a child of the element it
supplies title information for. - An element with XLink typetitle only has XLink
specified meaning if it is the child of an
element with an XLink type of extended, locator,
or arc.
20extended - LinkExample
- XML Document
- ltdoc xmlnsxlink/xlinkgt
- ltorder xlinktypeextended gt
- ltcar xlinktyperesource xlinklabelc1gtPorsch
e lt/cargt - ltcar xlinktyperesource xlinklabelc1gtFerrar
i lt/cargt - ltaccount xlinktypelocator xlinklabela1
- xlinkhrefhttp//www.chargeme.com/cgi/citiba
nk-12-3123 - xlinktitleBrian Temple/gt
- ltlocation xlinktyperesource xlinklabeld1gt
- ltattngtMatthias Hauswirthlt/attngt
- ltstreetgtlt/streetgt ltzipgt80303lt/zipgt
- lt/ location gt
- ltcharge_to xlinktypearc xlinkfromc1
xlinktoa1 - xlinktitleBrian pays/gt
- ltdeliver_to xlinktypearc xlinkfromc1
xlinktod1/gt - lt/ordergt
- lt/docgt
BankAccount
21none
- An element with XLink typenone has no XLink
specified meaning. - This can be used to enable one to turn XLink on
and off in individual elements in an element type
that is XLink aware.
22noneExample
DTD lt!ELEMENT ref (stuff)gt lt!ATTLIST ref
xlinktype (simplenone) none xlinkhref
CDATA IMPLIED gt
Markup ltref xlinktypesimple
xlinkhrefhttp//x.comgt ltstuffgtstufflt/stuffgt
lt/refgt ltrefgt ltstuffgtstufflt/stuffgt lt/refgt
ref element with link
ref element without link
23Behavioral Attributes
- The two behavior attributes, show and actuate,
give an XLink application instructions on how and
when, respectively, to display the ending
resources of links.
24show attribute
- The show attribute on a simple link or an arc
describes how the application interpreting XLink
should present the ending resource of the link or
arc. - The value of the show attribute is one of new,
replace, embed, other, or none - Linkbase arcs must be treated as if shownone,
regardless of the value specified.
25show attribute values
- new the application should open the ending
resource in a new window, frame, or similar
context. - replace the application should load the
ending resource in the same window, frame, etc.
as the starting resource. - embed the application should load the the
ending resource in place of the starting
resource. - other the application should use other markup
in the link to determine how the ending resource
should be handled. - none the application is not constrained on
how to load the ending resource.
26actuate attribute
- The actuate attribute on a simple link or an arc
describes when the application interpreting XLink
should make the traversal. - The value of the actuate attribute is one of
onLoad, onRequest, other, or none - Linkbase arcs must be treated as if
actuateonLoad, regardless of the value
specified.
27actuate attribute values
- onLoad the application should traverse to the
ending resource upon loading of the starting
resource. - onRequest the application should traverse to
the ending resource after loading of the starting
resource, but only when some explicit event (an
mouse click, etc.) initiates the traversal. - other the application should use other markup
in the link to determine how the traversal
occurs. - none the application is not constrained on
how it handles the traversal.
28Linkbases
- A linkbase is used to gather links in one place,
external to the items linked. - A linkbase is specified in an external link with
an arc type element with arcrolehttp//www.w3.or
g/1999/xlink/properties/linkbase - A linkbase must be XML.
29Traversals
- In an simple link a traversal is specified by the
implicit local resource and the explicit remote
resource designated in the href attribute. - In an extended link, a set of traversals are
specified by the pairs each made up of a
from-node, consisting of a locator type element
whose label matches the value of the from
attribute in an arc, and a to-node, consisting of
a locator type element whose label matches the
value of the to attribute in the same arc.
30TraversalsExample
- XML Document
- ltdoc xmlnsxlink/xlinkgt
- ltorder xlinktypeextended gt
- ltcar xlinktyperesource xlinklabelc1gtPorsch
e lt/cargt - ltcar xlinktyperesource xlinklabelc1gtFerrar
i lt/cargt - ltaccount xlinktypelocator xlinklabela1
- xlinkhrefhttp//www.chargeme.com/cgi/citiba
nk-12-3123 - xlinktitleBrian Temple/gt
- ltlocation xlinktyperesource xlinklabeld1gt
- ltattngtMatthias Hauswirthlt/attngt
- ltstreetgtlt/streetgt ltzipgt80303lt/zipgt
- lt/ location gt
- ltcharge_to xlinktypearc xlinkfromc1
xlinktoa1 - xlinktitleBrian pays/gt
- ltdeliver_to xlinktypearc xlinkfromc1
xlinktod1/gt - lt/ordergt
- lt/docgt
Traverals for the charge_to arc carPorsche
?account carFerrari ?account
Traverals for the deliver_to arc carPorsche
?location carFerrari ? location
31Unclear areas
- simple link role
- Two arcs in an extended link cannot have the same
from and to values - show attribute values replace and embed
- The choice of the terms replace and embed for
values of the show attribute are not clear
32Unclear areas simple link role
- In a simple link, a role can be specified, but it
not clear whether the role is being defined for
the local resource or the remote resource.(In
the XLink Candidate Recommendation,
http//www.w3.org/TR/2000/CR-xlink-20000703/Overvi
ew.html, the example of single link functionality
implemented in an extended link, the role appears
as an attribute of the locator type element,
i.e., the remote resource. But an example does
not a specification make. And there is no reason
the local resource should not have a role
described.
33Unclear areas Two arcs in an extended link
cannot have the same from and to values
- In an extended link, only one arc can specify a
pair of xlinkfrom and xlinkto values. If there
are multiple relationships between a pair of
objects, they cannot be expressed as arcs from
one object to the other distinguished by
different arcrole attribute values. - This may be intended to prevent multiple
traversals where they might not be wanted, but
also prevents multiple traversals where they
might be needed.
34Unclear areasshow attribute valuesreplace and
embed
- The choice of the terms replace and embed for
values of the show attribute are not clear. - The description of replace says the application
should load the resource in the same window,
frame, pane, or other relevant presentation
context in which the starting resource was
loaded. - The description for embed says the application
should load it in place of the starting
resource.
35Implementations
- 1998 - University of Southhampton (see CARR in
the references) - 1998? - XLink in DSSSL Package. There is a
reference on xml.com to an implementation of
XLink, but the server does not respond. - 1999 XLinkFilter (see ST LAURENT in the
references) - None of the major browsers have support.
36Comments
- I have ignored XPointer.
- I would like to do a comparison of XLink and
Chimera functionality. - The lack of implementations is disturbing even
recognizing that XLink is still a Candidate
Recommendation. - The Unclear Areas popped right out from reading
the recommendation. This is not a good sign. - XML support for extended hyperlinks is a good
thing.
37References
- CARR Leslie Carr, Initial Experiences of an
XLink Implementation http//journals.ecs.soton.ac
.uk/xml4j/xlinkexperience.html - JIRAT Jiri Jirat, XLink Reference
http//zvon.org/xxl/xlink/Output/xlink_refs.html
- MALER Eve Maler, XLink and Xpointer Overview
http//www.oasis-open.org/cover/xlinkMaler980402.h
tml - ST LAURENT Simon St.Laurent, XLinkFilter An
Open Source Java XLink SAX Parser Filter
http//www.simonstl.com/projects/xlinkfilter/index
.html - vdVLIST Eric van der Vlist, XML Linking
Technologies http//www.xml.com/pub/2000/10/04/li
nking/index.html - XMLCOM XML Resource Guide XLink
http//www.xml.com/pub/Guide/XLink