Introduction to XPath 2.0

Wendell Piez and Deborah A. Lapeyre

Objectives of This Talk [slide 1]
Are We All Singing From the Same Page? [slide 2]
What is XPath? [slide 3]
XPath Has Two Main Uses [slide 4]
Warning: XPath is Still Not a Programming Language! [slide 5]
Examples of XPath 2.0 [slide 6]
Relationship Between XPath 1.0 and XPath 2.0 [slide 7]
Meet the XPath 2.0 Family [slide 8]
So What Happened to XPath 1.0? [slide 9]
XPath 2.0 is More Complicated Than XPath 1.0 [slide 10]
Warning: XPath 2.0 will Require More Slots in Your Long Term Memory! [slide 11]
Warning: We Don't Know All the Answers! (Yet) [slide 12]
XPath 2.0 is Still an “Expression Language” [slide 13]
In XPath 1.0 We Had Sets of Nodes [slide 14]
In XPath 2.0 We Have Sequences of Items [slide 15]
More than Ever, XPath 2.0 is About XML as Modeled Not About “XML Documents” [slide 16]
XPath 1.0 Tree Still Bearing Fruit! [slide 17]
Path Expressions in XPath 2.0 [slide 18]
Anatomy of a Location Step [slide 19]
Node Tests in XPath 2.0 [slide 21]
The Node Tests From XPath 1.0 Still With Us [slide 22]
There are New Node Tests [slide 23]
New Node Tests for (Schema-derived) “Types” [slide 24]
So What has Changed for Paths in XPath 2.0? [slide 25]
The Big New Thing is “Sequences”
Location Paths Change From Nodesets (1.0) to Sequences (2.0) [slide 27]
XPath 2.0 is All About Sequences [slide 28]
Examples of Sequences [slide 29]
Other Big Differences Between XPath 1.0 and XPath 2.0 [slide 31]
XPath 2.0 Expression Typing [slide 32]
Working with Typed Data [slide 33]
The XPath 2.0 Data Model [slide 34]
Under the Covers, the XPath 2.0 Model is Infoset and PSVI [slide 35]
New Data Model has Three Conceptual Building Blocks [slide 36]
New Noun “item” [slide 37]
Atomic Types [slide 38]
Types are Identified by Name [slide 39]
XSLT 2.0 “Minimal” Type Set (As Examples) [slide 40]
Atomic Value [slide 41]
XPath 2.0 Expressions and Operators [slide 42]
Expressions for Sequences [slide 43]
Sequences Take Predicates [slide 44]
Numeric Ranges Inside Sequences [slide 45]
For Expressions Iterate Over Sequences [slide 46]
More Cool Changes [slide 48]
Quantified Expressions (some and every) [slide 49]
XPath has Conditional (if) Expressions [slide 50]
Multiple Node Tests in One Step [slide 51]
Testing Node Identity and Intersection [slide 52]
Q: How Do You Know That XPath 2.0 Thinks It Is a Programming Language? [slide 53]
New Functions and New Larger Function Library [slide 54]
Some Functions Deal Directly with Typing [slide 55]
Expressions Concerning Typing [slide 56]
Other Solutions to Typing: Constructor Functions [slide 57]
New Functionality in Functions [slide 58]
String Functions are Greatly Enhanced [slide 59]
Some Functions Use Regular Expressions [slide 60]
Bunches of Functions for Sequences [slide 61]
Numerous Functions for Durations, Date and Time [slide 62]
The Wrap-up [slide 63]
XPath 2.0 Status [slide 64]
Old and New TLAs [slide 65]
Namespace Conventions [slide 66]
Relationship Between XPath 2.0 and XSLT 2.0 [slide 67]
The New XSLT 2.0 [slide 68]
XPath 1.0 Compatibility Mode [slide 69]
Moving Safely from 1.0 to 2.0 [slide 70]
What are “We” All Doing About XPath 2.0 [slide 71]
For more information
Where to Get the XPath 2.0 Specs [slide 72]
A Few XPath 2.0 Resources [slide 73]
Books on XSLT 2.0 [slide 74]
Admonitions and Arcana (tips and traps if time allows) [slide 75]
Don't Neglect the Obvious [slide 76]
Life in a Type-free World [slide 77]
Surprise! Operators Can Force Document Order [slide 78]
For Expressions and Location Paths Are Different! [slide 79]
Built-in Operator Precedence [slide 80]
Operator Precedence [slide 81]
Faking Node Sets with Sequences [slide 83]
Document Order/No Dup Expressions [slide 84]
Operators for Combining Sets of Nodes [slide 85]
Colophon [slide 86]