Title: XLink, XPointer
1XLink,XPointer
2Outline
- ID, IDREF
- XLink
- XPointer
- their use in XML Databases
3ID, IDREF
- ID
- unique identifier
- IDREF, IDREFS
- reference(s) to an existing ID
4ID, IDREF
ltbibgt ltauthor idRSgtltfirstnamegtRoselt/firstna
megt ltlastnamegtSedgewicklt/lastnamegtlt/authorgt
ltauthor idTFgtltfirstnamegtTravislt/firstnamegt
ltlastnamegtForresterlt/lastnamegtlt/authorgt
ltbook authorRSgt lttitlegtAlgorithms in
Javalt/titlegt ltisbngt0-201-51059-6lt/isbngt
ltpricegt46.25lt/pricegt lt/bookgt ltbook
authorTFgt lttitlegtJava Beans
Designlt/titlegt ltisbngt0-201-54330-3lt/isbngt
ltpricegt42.25lt/pricegt lt/bookgt
lt/bibgt
5XLink
- specifies constructs to describe links
- describes a syntax for links and their
characteristics - uses XML namespaces for XLink vocabulary
6XLink
- Simple Links
- Backward compatible and easy
- travel from one end to another
- Extended Links
- associates an arbitrary number of resources
- resources can be remote and/or local
7XLink - Simple Links
- ltbook
- xmlnsxlink"http//www.w3.org/1999/xlink"
- xlinktype"simple"
- xlinkhref"forrester.xml" gt
- lttitlegtAlgorithms in Javalt/titlegt
- ltisbngt0-201-51059-6lt/isbngt
- ltpricegt46.25lt/pricegt
- lt/bookgt
8XLink - Simple Link Attributes
- xlinktype"simple"
- xlinkhref URI target of this link
- xlinktitle
- xlinkshow new embed replace
- xlinkactuate onRequest onLoad none
- xlinkrole description of this link
content
9XLink - Extended Links
- ltbook
- xmlnsxlink"http//www.w3.org/1999/xlink"
- xlinktype"extended" gt
- lttitlegtAlgorithms in Javalt/titlegt
- ltisbngt0-201-51059-6lt/isbngt
- ltpricegt46.25lt/pricegt
- ( local remote )
- lt/bookgt
10Extended Links - Remote Resources
- ltreview
- xmlnsxlink"http//www.w3.org/1999/xlink"
- xlinktype"locator"
- xlinkhref"review56.xml" gt
-
- lt/reviewgt
11Extended Links - Local Resources
- ltreview
- xmlnsxlink"http//www.w3.org/1999/xlink"
- xlinktype"resource" gt
- ... any-content ...
-
- lt/reviewgt
12Extended Links
- ltbook ... gt
- ltreview ... gt
- ltreview ... gt
- ltreview ... gt
- ltreview ... gt
- lt/bookgt
13XPointer
- is built on top of the XPath (intra-document)
- extensions to XPath allow it to
- be used in URI references to address into
resources (inter-document) - address points and ranges as well as whole nodes
- locate information by string matching
14XPointer id(), id shourcut
- bib.xmlxptr( id( "RS" ) )
- bib.xml"RS"
- ltauthor idRSgt
- ltfirstnamegtRoselt/firstnamegt
- ltlasttnamegtSedgewicklt/lasttnamegt
- lt/authorgt
15XPointer root()
- bib.xmlxptr( / )
- ltbibgt
- ltauthorgt . . . lt/authorgt
- ltauthorgt . . . lt/authorgt
- .
- .
- ltbookgt . . . lt/bookgt
- ltbookgt . . . lt/bookgt
- .
- .
- lt/bibgt
16XPointer child
bib.xmlxptr( id( "RS" )/childfirstname )
bib.xmlRS/firstname ltfirstnamegtRoselt/firstname
gt
- bib.xmlxptr( id( "RS" )/child )
- bib.xmlRS/
- ltfirstnamegtRoselt/firstnamegt
- ltlasttnamegtSedgewicklt/lasttnamegt
17XPointer range
- bib.xmlxptr(id("RS")/range-to(id("TF")) )
- ltauthor idRSgtltfirstnamegtRoselt/firstnamegt
- ltlastnamegtSedgewicklt/lastnamegtlt/authorgt
- . . .
- ltauthor idTFgtltfirstnamegtTravislt/firstnamegt
- ltlastnamegtForresterlt/lastnamegtlt/authorgt
- resulting fragment is not guaranteed to be
well-formed
18Comments about XLink
- over 4 years First Working draft ?
Recommendation status - little activity
- interest shifted to RDF and Topic Maps
- describes the way resources are presented to the
user - onRequest
- embed
19Their use in XML Databases
- XPointer
- not a query language
- What does it mean "support XLink ?
- In a Web Browser?
- In an XML Database?
- "support XPointer ?
20Their use in XML Databases
- ID, IDREF
- (validating parser)
- XLink / XPointer
- referential integrity ? ensure links point to
valid documents/fragments - query results processing ?
21References
- http//www.w3.org/TR/xlink/
- http//www.w3.org/TR/xptr/
- http//www.xml.com