XQL (XML Query Language) Jonathan Robie (Software AG) Eduard Derksen (CSCIO) Peter Fankhauser (GMD-IPSI) Ed Howland (DEGA) Gerald Huck (GMD-IPSI) Ingo.

Slides:



Advertisements
Similar presentations
The Connection Factory Jeroen van Rotterdam, CTO May 19th, WWW9.
Advertisements

Bottom-up Evaluation of XPath Queries Stephanie H. Li Zhiping Zou.
Relational Algebra, Join and QBE Yong Choi School of Business CSUB, Bakersfield.
Internet Technologies1 1 Lecture 4: Programming with XSLT.
1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
XQUERY. What is XQuery? XQuery is the language for querying XML data The best way to explain XQuery is to say that XQuery is to XML what SQL is to database.
1 XQuery Web and Database Management System. 2 XQuery XQuery is to XML what SQL is to database tables XQuery is designed to query XML data What is XQuery?
XPath XML Path Language. Outline XML Path Language (XPath) Data Model Description Node values XPath expressions Relative expressions Simple subset of.
Instructor: Craig Duckett CASE, ORDER BY, GROUP BY, HAVING, Subqueries
Introduction to Structured Query Language (SQL)
XSL Concepts Lecture 7. XML Display Options What can XSL Transformations do? generation of constant text suppression of content moving text (e.g., exchanging.
1 COS 425: Database and Information Management Systems XML and information exchange.
Chapter 6 C Arrays Acknowledgment The notes are adapted from those provided by Deitel & Associates, Inc. and Pearson Education Inc. Arrays are data structures.
XQuery – The W3C XML Query Language Jonathan Robie, Software AG Don Chamberlin, IBM Research Daniela Florescu, INRIA.
XML Language Family Detailed Examples Most information contained in these slide comes from: These slides are intended.
XML –Query Languages, Extracting from Relational Databases ADVANCED DATABASES Khawaja Mohiuddin Assistant Professor Department of Computer Sciences Bahria.
Introduction to Structured Query Language (SQL)
September 15, 2003Houssam Haitof1 XSL Transformation Houssam Haitof.
Overview of XPath Author: Dan McCreary Date: October, 2008 Version: 0.2 with TEI Examples M D.
XML, distributed databases, and OLAP/warehousing The semantic web and a lot more.
XP New Perspectives on XML Tutorial 4 1 XML Schema Tutorial – Carey ISBN Working with Namespaces and Schemas.
Lecture 7 of Advanced Databases XML Querying & Transformation Instructor: Mr.Ahmed Al Astal.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
Lecture 21 XML querying. 2 XSL (eXtensible Stylesheet Language) In HTML, default styling is built into browsers as tag set for HTML is predefined and.
1 XML Schemas. 2 Useful Links Schema tutorial links:
XML CPSC 315 – Programming Studio Fall 2008 Project 3, Lecture 1.
TDDD43 XML and RDF Slides based on slides by Lena Strömbäck and Fang Wei-Kleiner 1.
XML DOCUMENTS & DATABASES. Summary of Introduction to XML HTML vs. XML HTML vs. XML Types of Data Types of Data Basics of XML Basics of XML XML Syntax,
Lecture 6 of Advanced Databases XML Querying & Transformation Instructor: Mr.Eyad Almassri.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
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.
Session II Chapter 2 – Chapter 2 – XSLhttp://
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 6 XSLT (Based on Møller and Schwartzbach,
Company LOGO OODB and XML Database Management Systems – Fall 2012 Matthew Moccaro.
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.
XSLT part of XSL (Extensible Stylesheet Language) –includes also XPath and XSL Formatting Objects used to transform an XML document into: –another XML.
August Chapter 6 - XPath & XPointer Learning XML by Erik T. Ray Slides were developed by Jack Davis College of Information Science and Technology.
Database Systems Part VII: XML Querying Software School of Hunan University
[ Part III of The XML seminar ] Presenter: Xiaogeng Zhao A Introduction of XQL.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
XP New Perspectives on XML, 2 nd Edition Tutorial 8 1 TUTORIAL 8 CREATING ELEMENT GROUPS.
1 XML Data Management XPath Principles Werner Nutt.
XML Query: xQuery Reference: Xquery By Priscilla Walmsley, Published by O’Reilly.
More XML XPATH, XSLT CS 431 – February 23, 2005 Carl Lagoze – Cornell University.
XP New Perspectives on XML, 2 nd Edition Tutorial 7 1 TUTORIAL 7 CREATING A COMPUTATIONAL STYLESHEET.
University of Nottingham School of Computer Science & Information Technology Introduction to XML 2. XSLT Tim Brailsford.
XP 1 XSLT II Robin Burke ECT 360. XP 2 Outline Conditionals Numbering Functions and operators Variables and parameters Named and recursive templates.
XPath --XML Path Language Motivation of XPath Data Model and Data Types Node Types Location Steps Functions XPath 2.0 Additional Functionality and its.
XP 1 XSLT II Robin Burke ECT 360. XP 2 Homework #4 Forgot we hadn't covered "choose" becomes extra credit My books.xml didn't include descriptions.
Displaying Data with XSLT ©NIITeXtensible Markup Language/Lesson 6/Slide 1 of 45 Objectives In this lesson, you will learn to: * Perform conditional formatting.
5 Copyright © 2004, Oracle. All rights reserved. Navigating XML Documents by Using XPath.
XML Schema – XSLT Week 8 Web site:
XML Namespaces In this first lesson XML Namespaces, you will learn to:
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.
1 XSLT XSLT (extensible stylesheet language – transforms ) is another language to process XML documents. Originally intended as a presentation language:
XML: Extensible Markup Language
MySQL Subquery Source: Dev.MySql.com
Querying and Transforming XML Data
Instructor: Craig Duckett Lecture 09: Tuesday, April 25th, 2017
LINQ to DATABASE-2.
Introduction to XHTML.
XML Path Language Andy Clark 17 Apr 2002.
SELECT & FROM Commands Farrokh Alemi, PhD
eXtensible Markup Language (XML)
Chapter 8 Advanced SQL.
More XML XML schema, XPATH, XSLT
XML DOCUMENTS & DATABASES
Presentation transcript:

XQL (XML Query Language) Jonathan Robie (Software AG) Eduard Derksen (CSCIO) Peter Fankhauser (GMD-IPSI) Ed Howland (DEGA) Gerald Huck (GMD-IPSI) Ingo Macherius (GMD-IPSI) Makoto Murata (Fuji Xerox) Michael Resnick (Object Design, Incorporated) Harald Schöning (Software AG)

XQL vs. SQL What is the database? –SQL: A set of tables –XQL: A set of one or more XML documents. What is the query language? –SQL: A query language that uses the structure of tables as a basic model. –XQL: A query language that uses the structure of XML documents as a basic model. What is the input to a query? –SQL: The FROM clause determines the tables which are examined by the query. –XQL: A query is given a list of input nodes from one or more documents. What is the result of a query? –SQL: The result of a query is a table containing a set of rows; this table may serve as the basis for further queries. –XQL: The result of a query is a list of XML document nodes, which may serve as the basis for further queries.

XQL Expressions Terms Namespaces and Names Comparisons Hierarchy and Filters Boolean and Set Operators Grouping Operator Sequence

XQL Expressions (cond.) Functions Extensible Functions References (not incorporated into XQL) Joins Renaming Operator Precedence of Operators

Learn XQL by Examples Terms: –A simple string is interpreted as an element name: Query example: author. –Attribute names begin with Query example: Hierarchy: –Child operator “/” Query example: /novel/author –Paths are described from the top down and usually the right-most element on the path is returned –Descendant operator ("//") indicates any number of intervening levels Example: novel//address –Shows addresses anywhere within.

Learn XQL by Examples (cond.) Filters: –Filter operator ("[ ]") filters the set of nodes to its left based on the conditions inside the brackets. Example: –Returns addresses: each address must have an attribute called "type" with the value " ”. Boolean Operations and Comparisons: –Boolean operators can be used to combine conditions. Example: –novel/author =’Tom’ Set Operations: –Can be used to combine Terms or other XQL expressions. Example: q1 union q2 (also can be written as q1 | q2) Example: q1 intersect q2

Learn XQL by Examples (cond.) Namespaces and Names: –Names may be associated with namespace prefixes –A namespace prefix can be declared using a variable. –Example: b := " //b:book The first line declares "b" to be a variable equivalent to the namespace URI " The second line searches for all elements in this namespace. Grouping Operator: –Useful to group results. –Example: //book {.//author} The element to the left of the {} is used to group the results of the query within the braces.

Learn XQL by Examples (cond.) Sequence Operators: –a before b (returns a list of all "a"s that precede a "b”) –a after b (returns a list of all "a"s that occur after a "b”) –a, b(returns a list containing all "a"s, followed by all "b"s) XQL operators generally maintain document order. Useful for specifying order in return lists. Functions: –XQL provide some functions. –Example: element(), element(‘name’) –returns elements in the context. If a name argument is supplied, returns the elements with the given name. count()

Learn XQL by Examples (cond.) Extensible Functions: –Allow users to write their own functions –Functions are passed the list of nodes in the current context. If the function has parameters, these are passed as strings. –The result of a function call is also a nodelist. Example: –User can add a function that computes the average for a list of values and call it in an XQL query –average(property//price) – Renaming Operator –Nodes in a list can be renamed using renaming operator "->". Example: //book->a:book Rename the book into a new namespace a

Learn XQL by Examples (cond.) References: –XSL provides "id()" function, which returns the element containing a given id. Example: –Return the node pointed to by an HREF attribute in an element Actually it is a join. But this syntax less complex than join. –XQL extends to incorporate any kind of link, not just ID/IDREF. Example: Function ref() returns the node (nodes) to which an XPointer or HTML HREF points Can specify parameters to this function –Example: "table") –Return the referenced node only if it is a 'table" element; otherwise, will return null.

Learn XQL by Examples (cond.) Joins: –Combine information from multiple sources to create one unified view. –Example: /book { isbn | title | author | //review { reviewer | comments } } –Only correct when the database consists only of this one book and this one review. /book[$i:=isbn] { isbn | title | author | //review[isbn=$i] { reviewer | comments }} –using correlation variables to restrict the reviews to those that have the same ISBN number as the book.