Download presentation
Presentation is loading. Please wait.
1
XLink Van Lepthien CSCI 7818 Fall 2000
2
Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References
3
What is XLink? XLink “allows elements to be inserted into XML documents in order to create and describe links between resources.”
4
What 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
5
What is XLink? Enables hyperwebs (this slide for Ken’s benefit)
6
W3C Stuff XML XLink Requirements Version 1.0 W3C Note 24-Feb-1999 ( http://www.w3.org/TR/NOTE-xlink-req/ ) 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/) http://www.w3.org/TR/xlink/ Namespace: xmlns:xlink=“ http://www.w3.org/1999/xlink” http://www.w3.org/1999/xlink
7
XLink Scope Element Conformance Application Conformance
8
Element 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.
10
XLink 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
11
Link - simple Defines an outbound link from a local resource to a remote resource. Similar to HTML references … or 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
12
simple - Link Example XML Document <doc … xmlns:xlink=“…/xlink”> … <mytag xlink:type=“simple” xlink:role=“role_uri” xlink:href=“ref_uri” xlink:show=“new” xlink:actuate=“onLoad”> … … 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
13
Link - 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.
14
Link - extended A link element with XLink type=“extended” contains a set of elements with XLink types of resource, locator, arc, and title.
15
resource An element with XLink type=“resource” 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
16
locator An element with XLink type=“locator” 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
17
arc An element with XLink type=“arc” 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)
18
arc 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
19
title An element with XLink type=“title” 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 type=“title” only has XLink specified meaning if it is the child of an element with an XLink type of extended, locator, or arc.
20
extended - Link Example XML Document Porsche Ferrari <account xlink:type=“locator” xlink:label=“a1” xlink:href=“http://www.chargeme.com/cgi/citibank-12-3123” xlink:title=“Brian Temple”/> Matthias Hauswirth … … 80303 <charge_to xlink:type=“arc” xlink:from=“c1” xlink:to=“a1” xlink:title=“Brian pays”/> Bank Account
21
none An element with XLink type=“none” 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.
22
none Example DTD … <!ATTLIST ref xlink:type (simple|none) “none” xlink:href CDATA #IMPLIED > Markup … stuff … stuff “ref” element with link “ref” element without link
23
Behavioral 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.
24
show 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 show=“none”, regardless of the value specified.
25
show 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.
26
actuate 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 actuate=“onLoad”, regardless of the value specified.
27
actuate 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.
28
Linkbases 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 arcrole=“http://www.w3.org/1999/xlink/properties/linkbase” A linkbase must be XML.
29
Traversals 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.
30
Traversals Example XML Document Porsche Ferrari <account xlink:type=“locator” xlink:label=“a1” xlink:href=“http://www.chargeme.com/cgi/citibank-12-3123” xlink:title=“Brian Temple”/> Matthias Hauswirth … … 80303 <charge_to xlink:type=“arc” xlink:from=“c1” xlink:to=“a1” xlink:title=“Brian pays”/> Traverals for the “charge_to” arc car:Porsche account car:Ferrari account Traverals for the “deliver_to” arc car:Porsche location car:Ferrari location
31
Unclear 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
32
Unclear 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/Overview.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.XLink Candidate Recommendation http://www.w3.org/TR/2000/CR-xlink-20000703/Overview.html
33
Unclear 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 xlink:from and xlink:to 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.
34
Unclear areas show attribute values “replace” 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.”
35
Implementations 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.
36
Comments 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.
37
References [CARR] Leslie Carr, Initial Experiences of an XLink Implementation; http://journals.ecs.soton.ac.uk/xml4j/xlinkexperience.html http://journals.ecs.soton.ac.uk/xml4j/xlinkexperience.html [JIRAT] Jiri Jirat, XLink Reference; http://zvon.org/xxl/xlink/Output/xlink_refs.html http://zvon.org/xxl/xlink/Output/xlink_refs.html [MALER] Eve Maler, XLink and Xpointer Overview; http://www.oasis- open.org/cover/xlinkMaler980402.htmlhttp://www.oasis- open.org/cover/xlinkMaler980402.html [ST LAURENT] Simon St.Laurent, XLinkFilter: An Open Source Java XLink SAX Parser Filter; http://www.simonstl.com/projects/xlinkfilter/index.htmlhttp://www.simonstl.com/projects/xlinkfilter/index.html [vdVLIST] Eric van der Vlist, XML Linking Technologies; http://www.xml.com/pub/2000/10/04/linking/index.html http://www.xml.com/pub/2000/10/04/linking/index.html [XMLCOM] XML Resource Guide: XLink; http://www.xml.com/pub/Guide/XLink http://www.xml.com/pub/Guide/XLink
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.