Introduction to XPointer By Wenming Ye. What is XPointer? §an extension of XPath suited for linking §specifies connection between XPath expressions and.

Slides:



Advertisements
Similar presentations
Advanced XSLT II. Iteration in XSLT we sometimes wish to apply the same transform to a set of nodes we iterate through a node set the node set is defined.
Advertisements

Dr. Alexandra I. Cristea CS 253: Topics in Database Systems: XPath, NameSpaces.
What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
Internet Technologies1 1 Lecture 4: Programming with XSLT.
XPath XML Path Language. Outline XML Path Language (XPath) Data Model Description Node values XPath expressions Relative expressions Simple subset of.
XPath Eugenia Fernandez IUPUI. XML Path Language (XPath) a data model for representing an XML document as an abstract node tree a mechanism for addressing.
Multi Platform Applications XML, XPath, XSLT transform.
Lecture 10. Back to the table example We can now return to considering in detail the first XSLT style-sheet we saw –The one which, when applied to the.
Lecture 13. The various node tests also work on this axis: eg node() This book has descendant-or- self nodes As expected, text nodes are included in the.
Introduction to XLink Transparency No. 1 XML Information Set W3C Recommendation 24 October 2001 (1stEdition) 4 February 2004 (2ndEdition) Cheng-Chia Chen.
XSL Transformations Lecture 8, 07/08/02. Templates The whole element is a template The match pattern determines where this template applies Result element(s)
Internet Technologies XSLT Processing XML using XSLT Using XPath Escaping to Java.
Introduction to XLink Transparency No. 1 How the Minimum Set of Platform Plugins Are Related Cheng-Chia Chen.
Lecture 12. Default Processing in XSLT The default processing in XSLT is to process the XPath root node The default processing for various node types.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
Object Oriented Programming III1 XSLT Processing XML using XSLT Using XPath.
Internet Technologies1 XSLT Processing XML using XSLT Using XPath.
Introduction to XPath Bun Yue Professor, CS/CIS UHCL.
SD2520 Databases using XML and JQuery
Sheet 1XML Technology in E-Commerce 2001Lecture 6 XML Technology in E-Commerce Lecture 6 XPointer, XSLT.
Navigating XML. Overview  Xpath is a non-xml syntax to be used with XSLT and Xpointer. Its purpose according to the W3.org is  to address parts of an.
Lecture 6 of Advanced Databases XML Schema, Querying & Transformation Instructor: Mr.Ahmed Al Astal.
XML for E-commerce III Helena Ahonen-Myka. In this part... n Transforming XML n Traversing XML n Web publishing frameworks.
XML and XPath. Web Services: XML+XPath2 EXtensible Markup Language (XML) a W3C standard to complement HTML A markup language much like HTML origins: structured.
1/17 ITApplications XML Module Session 7: Introduction to XPath.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
XP 1 CREATING AN XML DOCUMENT. XP 2 INTRODUCING XML XML stands for Extensible Markup Language. A markup language specifies the structure and content of.
WORKING WITH XSLT AND XPATH
1 XPath XPath became a W3C Recommendation 16. November 1999 XPath is a language for finding information in an XML document XPath is used to navigate through.
Processing of structured documents Spring 2002, Part 2 Helena Ahonen-Myka.
XML About XML Things to be known Related Technologies XML DOC Structure Exploring XML.
1 Tutorial 13 Validating Documents with DTDs Working with Document Type Definitions.
SENG 422 Lab 5 An Introduction to XML Time: ELW B220 from (4:00 - 6:50) every Tuesday TA: Philip Baback Alipour Ph.D. Candidate in Electrical, Computer.
Avoid using attributes? Some of the problems using attributes: Attributes cannot contain multiple values (child elements can) Attributes are not easily.
XPath Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
Processing of structured documents Spring 2003, Part 7 Helena Ahonen-Myka.
XQL, OQL and SQL Xia Tang Sixin Qian Shijun Shen Feb 18, 2000.
XPath. Why XPath? Common syntax, semantics for [XSLT] [XPointer][XSLT] [XPointer] Used to address parts of an XML document Provides basic facilities for.
ECA 228 Internet/Intranet Design I XSLT Example. ECA 228 Internet/Intranet Design I 2 CSS Limitations cannot modify content cannot insert additional text.
CITA 330 Section 6 XSLT. Transforming XML Documents to XHTML Documents XSLT is an XML dialect which is declared under namespace "
XML Part 2 Josh Steele CS 6704, Spring XML Part 2 XSL/XSLT –Structure Revisited –Definition –Example –Components XML’s Linking Languages XML’s Uses.
Lecture 11 XSL Transformations (part 1: Introduction)
August Chapter 6 - XPath & XPointer Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
XPath Aug ’10 – Dec ‘10. XPath   XML Path Language   Technology that allows to select a part or parts of an XML document to process   XPath was.
Advanced Selenium.  XPath is used to navigate through elements and attributes in a document.  XPath includes over 100 built-in functions.  Functions.
CSE 636 Data Integration Fall 2006 XML Query Languages XPath.
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
XML Design Goals 1.XML must be easily usable over the Internet 2.XML must support a wide variety of applications 3.XML must be compatible with SGML 4.It.
CS 157B: Database Management Systems II February 11 Class Meeting Department of Computer Science San Jose State University Spring 2013 Instructor: Ron.
Introduction to the Document Object Model Eugenia Fernandez IUPUI.
 2008 Pearson Education, Inc. All rights reserved Document Object Model (DOM): Objects and Collections.
Well Formed XML The basics. A Simple XML Document Smith Alice.
XML and Object Serialization. Structure of an XML Document Header Root Element Start Tags / End Tags Element Contents – Child Elements – Text – Both (mixed.
SNU OOPSLA Lab. Hypertext links(XLL) © copyright 2001 SNU OOPSLA Lab.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
Hypertext. Hypertext History (1) Many early attempts to organize human knowledge Many early attempts to organize human knowledge Thesaurus (Roget) Thesaurus.
XPath --XML Path Language Motivation of XPath Data Model and Data Types Node Types Location Steps Functions XPath 2.0 Additional Functionality and its.
XSLT: How Do We Use It? Nancy Hallberg Nikki Massaro Kauffman.
1 XPath. 2 Agenda XPath Introduction XPath Nodes XPath Syntax XPath Operators XPath Q&A.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 14 This presentation © 2004, MacAvon Media Productions XML.
CITA 330 Section 5 XPath. XSL XSL (Extensible Stylesheet Language) is the standard language for writing stylesheets to transform XML documents among different.
5 Copyright © 2004, Oracle. All rights reserved. Navigating XML Documents by Using XPath.
CH 15 XSL Transformations 1. Objective What is XSL? Overview of XSL transformations Understanding XSL templates Computing the value of a node with xsl:value-of.
Unit 4 Representing Web Data: XML
Beginning XML 4th Edition.
Querying and Transforming XML Data
Introduction to the Document Object Model
LINKS.
The XML Language.
XML Path Language Andy Clark 17 Apr 2002.
Presentation transcript:

Introduction to XPointer By Wenming Ye

What is XPointer? §an extension of XPath suited for linking §specifies connection between XPath expressions and URIs §Related to, but much more powerful than location specification of HTML.

Example of HTML location Ref § or § Reference to locationTag §Problems: l An anchor must be placed at every link l The link definition must be at the same location as the link source l Only individual nodes can be linked to

Xpointer examples The Tag # Introduction locates an ID. ………. * #xpointer(id("foo")) * Match: …

Absolute location §Root() root of the document tree. §Origin() Where the traversal started. §Id() You just saw this. §Html() existing compatibility.

Relative Location (from Xpath) §Child(): 1 level down. §descendant() depth first down. §ancestor() §following() appears after §psibling() Previous sibling. §fsibling() following.

Syntax child(2, section).(1,subsection) is the same as: child(2, section).child(1, subsection) If key word is omitted, it is treated as equivalent to the immediately preceding keyword. First keyword must not be omitted. Child(-1, section) Returns the last section tag of the xml document.

Attributes §#pi (processing instruction) §#comment(XML comment) §#text (CDATA) text region inside elem & CDATA §#cdata (Same as above) §#all (same as #element)

Another example ]> Polonius crossing downstage Fare you well, my lord. To Ros. You go to seek Lord Hamlet? There he is.

id(a27).child(2,DIRECTION) Selects the second " DIRECTION" element (whose content is " To Ros."). id(a27).child(2,#element) Selects the second child element (that is, the first direction, whose content is " crossing downstage"). id(a27).child(2,#text) Selects the second text region, " Fare you well, my lord." (The line break between the SPEAKER and DIRECTION elements is the first text region.) Polonius crossing downstage Fare you well, my lord. To Ros. You go to seek Lord Hamlet? There he is.

child(1,#element,TARGET,*) child(1,#element,N,2).(1,#element,N,1) child(1,FS,RESP,#IMPLIED) first child, FS element, RESP attribute that is unspecified html(Sec3.2) root().descendant(1,A,NAME,"Sec3.2")

Spanning Term The span keyword locates a sub-resource starting at the beginning of the data selected by its first argument and continuing through to the end of the data selected by its second argument. Example: id(a23).span(child(1),child(3)) Attribute-match Term The attr keyword takes only an attribute name as a selector and returns the attribute's value. Example: id(a23).attr(N)

String Location Terms Selects one or more strings or positions between strings in the location source. InstanceOrAll Position Length Example: root().string(3,"Thomas Pynchon",8) SkipLit StringTerm ::= 'string(' InstanceOrAll ',InstanceOrAll ' SkipLit (',' Position (',' Length')?)?)'SkipLitPositionLength

For more Resources. Text book. IBM XML parser.