XLink, XPointer - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

XLink, XPointer

Description:

author id='RS' firstname Rose /firstname lastname Sedgewick ... xlink:actuate onRequest | onLoad | none. xlink:role description of this link' content ... – PowerPoint PPT presentation

Number of Views:451
Avg rating:3.0/5.0
Slides: 22
Provided by: UGALib3
Category:

less

Transcript and Presenter's Notes

Title: XLink, XPointer


1
XLink,XPointer
  • Boanerges Aleman Meza

2
Outline
  • ID, IDREF
  • XLink
  • XPointer
  • their use in XML Databases

3
ID, IDREF
  • ID
  • unique identifier
  • IDREF, IDREFS
  • reference(s) to an existing ID

4
ID, 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
5
XLink
  • specifies constructs to describe links
  • describes a syntax for links and their
    characteristics
  • uses XML namespaces for XLink vocabulary

6
XLink
  • 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

7
XLink - 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

8
XLink - 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

9
XLink - 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

10
Extended Links - Remote Resources
  • ltreview
  • xmlnsxlink"http//www.w3.org/1999/xlink"
  • xlinktype"locator"
  • xlinkhref"review56.xml" gt
  • lt/reviewgt

11
Extended Links - Local Resources
  • ltreview
  • xmlnsxlink"http//www.w3.org/1999/xlink"
  • xlinktype"resource" gt
  • ... any-content ...
  • lt/reviewgt

12
Extended Links
  • ltbook ... gt
  • ltreview ... gt
  • ltreview ... gt
  • ltreview ... gt
  • ltreview ... gt
  • lt/bookgt

13
XPointer
  • 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

14
XPointer id(), id shourcut
  • bib.xmlxptr( id( "RS" ) )
  • bib.xml"RS"
  • ltauthor idRSgt
  • ltfirstnamegtRoselt/firstnamegt
  • ltlasttnamegtSedgewicklt/lasttnamegt
  • lt/authorgt

15
XPointer root()
  • bib.xmlxptr( / )
  • ltbibgt
  • ltauthorgt . . . lt/authorgt
  • ltauthorgt . . . lt/authorgt
  • .
  • .
  • ltbookgt . . . lt/bookgt
  • ltbookgt . . . lt/bookgt
  • .
  • .
  • lt/bibgt

16
XPointer child
bib.xmlxptr( id( "RS" )/childfirstname )
bib.xmlRS/firstname ltfirstnamegtRoselt/firstname
gt
  • bib.xmlxptr( id( "RS" )/child )
  • bib.xmlRS/
  • ltfirstnamegtRoselt/firstnamegt
  • ltlasttnamegtSedgewicklt/lasttnamegt

17
XPointer 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

18
Comments 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

19
Their 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 ?

20
Their use in XML Databases
  • ID, IDREF
  • (validating parser)
  • XLink / XPointer
  • referential integrity ? ensure links point to
    valid documents/fragments
  • query results processing ?

21
References
  • http//www.w3.org/TR/xlink/
  • http//www.w3.org/TR/xptr/
  • http//www.xml.com
Write a Comment
User Comments (0)
About PowerShow.com