XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases...

37
XLink Van Lepthien CSCI 7818 Fall 2000
  • date post

    15-Jan-2016
  • Category

    Documents

  • view

    221
  • download

    0

Transcript of XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases...

Page 1: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

XLink

Van Lepthien

CSCI 7818

Fall 2000

Page 2: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

Overview

• What is XLink?• W3C Stuff• XLink Elements• Linkbases• Traversals• Implementations• Comments• References

Page 3: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

What is XLink?

• XLink “allows elements to be inserted into XML documents in order to create and describe links between resources.”

Page 4: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 5: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

What is XLink?

Enables hyperwebsEnables hyperwebs

(this slide for Ken’s benefit)(this slide for Ken’s benefit)

Page 6: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

W3C 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/)

• Namespace:xmlns:xlink=“http://www.w3.org/1999/xlink”

Page 7: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

XLink Scope

• Element Conformance

• Application Conformance

Page 8: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 9: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 10: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 11: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

Link - simple

Defines an outbound link from a local resource to a remote resource.

• Similar to HTML references<a href=“uri”> …</a> or <img href=“uri”>

• 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

Page 12: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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”>…</mytag>…</doc>

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

Page 13: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 14: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

Link - extended

A link element with XLink type=“extended” contains a set of elements with XLink types of resource, locator, arc, and title.

Page 15: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 16: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 17: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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)

Page 18: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 19: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 20: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

extended - LinkExample

XML Document<doc xmlns:xlink=“…/xlink”><order xlink:type=“extended” > <car xlink:type=“resource” xlink:label=c1>Porsche </car> <car xlink:type=“resource” xlink:label=c1>Ferrari </car> <account xlink:type=“locator” xlink:label=“a1” xlink:href=“http://www.chargeme.com/cgi/citibank-12-3123” xlink:title=“Brian Temple”/> <location xlink:type=“resource” xlink:label=d1> <attn>Matthias Hauswirth</attn> <street>…</street> …<zip>80303</zip> </ location > <charge_to xlink:type=“arc” xlink:from=“c1” xlink:to=“a1” xlink:title=“Brian pays”/> <deliver_to xlink:type=“arc” xlink:from=“c1” xlink:to=“d1”/></order></doc>

BankAccount

Page 21: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 22: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

noneExample

DTD…<!ELEMENT ref (stuff)><!ATTLIST ref xlink:type (simple|none) “none” xlink:href CDATA #IMPLIED >

Markup…<ref xlink:type=“simple” xlink:href=“http://x.com”> <stuff>stuff</stuff></ref>…<ref> <stuff>stuff</stuff></ref>

“ref” element with link

“ref” element without link

Page 23: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 24: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 25: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 26: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 27: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 28: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 29: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 30: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

TraversalsExample

XML Document<doc xmlns:xlink=“…/xlink”><order xlink:type=“extended” > <car xlink:type=“resource” xlink:label=c1>Porsche </car> <car xlink:type=“resource” xlink:label=c1>Ferrari </car> <account xlink:type=“locator” xlink:label=“a1” xlink:href=“http://www.chargeme.com/cgi/citibank-12-3123” xlink:title=“Brian Temple”/> <location xlink:type=“resource” xlink:label=d1> <attn>Matthias Hauswirth</attn> <street>…</street> …<zip>80303</zip> </ location > <charge_to xlink:type=“arc” xlink:from=“c1” xlink:to=“a1” xlink:title=“Brian pays”/> <deliver_to xlink:type=“arc” xlink:from=“c1” xlink:to=“d1”/></order></doc>

Traverals for the “charge_to” arccar:Porsche accountcar:Ferrari account

Traverals for the “deliver_to” arccar:Porsche locationcar:Ferrari location

Page 31: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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

Page 32: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 33: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 34: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

Unclear areasshow 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.”

Page 35: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 36: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

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.

Page 37: XLink Van Lepthien CSCI 7818 Fall 2000. Overview What is XLink? W3C Stuff XLink Elements Linkbases Traversals Implementations Comments References.

References

[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.html

[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/linking/index.html

[XMLCOM] XML Resource Guide: XLink; http://www.xml.com/pub/Guide/XLink