XML: XPath XLINK - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

XML: XPath XLINK

Description:

Xlink:actuate='onRequest' Role is a URI that references a resources that describes the link ... Actuate - onRequest, onLoad, other, none. Extended links ... – PowerPoint PPT presentation

Number of Views:140
Avg rating:3.0/5.0
Slides: 16
Provided by: sergiod8
Category:
Tags: xlink | xml | actuate | xpath

less

Transcript and Presenter's Notes

Title: XML: XPath XLINK


1
XML XPath XLINK
  • Spring 2002
  • Dr. Sergio Davalos

2
XML Path Language XPATH
  • View XML document as a tree
  • Directory/subdirectories/files
  • Nodes
  • Node types root, element, attribute, text,
    comment, processing instruction, namespace
  • XPath tree root node/ root node and element
    nodes contain lists of child nodes
  • Child nodes are element, comment, text,
    processing instruction
  • Attribute and namespace describe the environment
    in which the parent node
  • Figure 11.2
  • Descendent text nodes
  • Document order
  • Figure 11.4

3
Other
  • Location Path expression for navigating a tree
    from node to node sequence of location steps
  • Axes
  • Context node
  • Content for searching
  • Forward axes, reverse axes
  • Node test refine set of selected nodes
  • Location path using axes and node tests
  • Axisnotest for predicate
  • Child -select all child of context node
  • Childtext() all text elements child
  • Child/childtest() grandchildren of context
    node
  • Body all element body of context node
  • //body for /descendent-or-
  • selfnode()/childbody

4
Continued
  • Head body
  • Union of two children element nodes of the
    context nod
  • Head/title last() - uses the predicate last
    to select the last bold element contained in the
    head element
  • Pointers within XSL, XSLT

5
XLINK, XPointer, XInclude, Xbase
  • Hypertext
  • XLINK
  • XLINK and DTDs
  • XPointer
  • XML Inclusions
  • XML XBase (XBASE)

6
Hypertext
  • What is it linked segments of information
  • Link names and Types
  • Power of links
  • Problems navigation, searching
  • Compromise XLINK

7
XLINK
  • HTML link a element and href
  • XML linking language XLINK
  • XLINK links resources documents, audio, video,
    db.
  • Movie could be linked to its sound track
  • Song linked to information about the artist
  • Available when information is accessed - song
    played
  • Link to a set of resources

8
XLINK
  • Simple links
  • ltbook xlinktypesimple xlinkhref/textbooks/x
    mlHowToProgram.xmlgt
  • Local resource links to remote resource
  • Use an arc

9
XLINK
  • ltbook
  • xlinktypesimple
  • xlinkhrefabout.xml
  • xlinkrolehttp//www.davalos.com/xlink/contact
  • Xlinktitle gt
  • Role is a URI that references a resources that
    describes the link
  • Title descriptive title for the link
  • Figure 14.2 page 375

10
Figure 14.4
  • ltbook
  • xlinktypesimple
  • xlinkhrefabout.xml
  • xlinkrolehttp//www.davalos.com/xlink/contact
  • xlinktitle About S. Davalos
  • xlinkshow new
  • XlinkactuateonRequestgt
  • Role is a URI that references a resources that
    describes the link
  • Title descriptive title for the link
  • Show new display resource in new window
  • Replace (replace current resource, embed
    replace current element, other, none
  • Actuate - onRequest, onLoad, other, none

11
Extended links
  • Extended links multiple combinations of local
    and remote resources
  • Unidirectional
  • multidirectional (go back) - access all links to
    all linked documents Figure 14.7
  • Figure 14.8 (rendered 14.9)
  • ltauthor xlinklabel authorDeitel identifies
    the resource
  • arcrole -
  • to
  • from
  • type locator where resources located
  • - resource local resource

12
XLINK
  • Arc information
  • ltarcElement
  • xlinktype arc
  • XlinkfromJavaBook
  • Xlinkarcrolehttp//deitel.com/xlink/info
  • Xlinkto authorDeitel

13
XLINK and DTDs
  • Can define links in DTD
  • Figure 14.13

14
XPointer
  • Use XPointer to link specific parts of a resource
  • Specific locations (nodes in a XPath tree) or
    ranges of location in an XML document
  • pointerlocation within the document

15
XML Inclusions
  • XInclude include one XML in another
Write a Comment
User Comments (0)
About PowerShow.com