XQuery
Please turn off all
Versions Covered
XQuery
XQuery Language
Documents to Query
Physical Representations to Query
Where is XQuery used?
The XML Model vs. the Relational Model
Query Data Types
An example document to query
The XQuery FLWOR
Query: List titles of all books
Query Result: Book Titles
XQueryX
Specifying a context node
Query Result with wrapping
XPath 1.0 Data Model
XPath 2.0 Data Model
Constructing sequences
Sequence example
Data types and the PSVI
Questions?
Element Constructors
Query Result: Book Titles
Attribute Constructors
Query Result
Text Constructors
Query Result
Other Constructors
Expected Query Result
Query with where
Query Result: Titles of books published by Addison-Wesley
Query with Booleans
Query Result: books published by Addison-Wesley before 1993
Query with multiple variables
Query Result: A list of all the title-author pairs
Nested FLWOR Queries
Query Result: A list of the title and authors of each book in the bibliography
Query with let
Query Result: price differences
if then else
Query Result: Price differences
Query with sorting
Query Result
A different document about books
This document uses a different DTD
Query that joins two documents
Result
prices.xml Query Sample Data
Query with reused variables
Query Result
Multiple FLWOR Queries
Query Result
Querying documents that use namespaces
Questions?
Query Software
What's the difference between XQuery and XSLT?
XPath 2.0
XPath 2.0 Goals
Held over from XPath 1.0
Accessor Functions
Constructor Functions
Casting
Four kinds of comparison operators
Value comparison operators
General comparisons
Node comparisons
Order comparisons
Questions?
Functions and operators
Arithmetic operators
Numeric Functions
String functions
Regular expressions
Boolean Functions and Operators
Date and time functions
Qualified Name Functions
Node Functions
Sequence Functions
Sequence size Functions
Context Functions
Questions?
Other New features in XPath 2.0
XPath Comments
Namespace wildcards
Can use functions as location steps
Can use parenthesized expressions as location steps
Dereference steps
For Expressions
for Example
for Example
Conditional Expressions
Quantified Expressions
Questions?
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2002, 2003 Elliotte Rusty Harold
Last Modified November 15, 2003