XSLT 2.0 and Beyond
Please turn off all
Outline
Versions Covered
XPath 2.0
XPath 2.0 Goals
XPath 2.0 Requirements
XPath 1.0 Data Model
XPath 2.0 Data Model
Working with Sequences
Constructing sequences
Sequence example
Unions of sequences
Intersections of sequences
Except sequences
Questions?
Data types and the PSVI
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 comparison operators
Numeric Functions
String functions
Regular expressions
Boolean Functions
Date and time functions
Qualified Name Functions
Binary operators
Node Functions
Sequence 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?
XSLT 2.0
XSLT 2.0 Goals
XSLT 2.0 Non-goals
XSLT 2.0 Requirements
Identifying 2.0 stylesheets
No result tree fragments
xsl:for-each-group
Grouping example: input
Grouping example: desired output
Grouping example: stylesheet
xsl:result-document
xsl:result-document Example
Sorting
xsl:namespace
Value of a sequence
default-xpath-namespace
An XSLT 1.0 stylesheet for working with XHTML
An XSLT 2.0 stylesheet for working with XHTML
User defined data elements
Typed variables and parameters
Functions defined in XSLT
Not parsing text files
Questions?
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
Element Constructors
Query Result: Book Titles
Query with where
Query Result: Titles of books published by Addison-Wesley
Query with Booleans
Query Result: books published by Addison-Wesley after 1993
Attribute Constructors
Query Result: books published by Addison-Wesley after 1993, including their year and title.
Query with multiple variables
Query Result: A list of all the title-author pairs
Nested Queries
Query Result: A list of the title and authors of each book in the bibliography
Query with distinct
Query Result
Query with sorting
Query Result
Queries with functions
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 FLWR Queries
Query Result
Query Software
What's the difference between XQuery and XSLT?
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2002, 2003 Elliotte Rusty Harold
Last Modified March 19, 2003