SLIDE 1
XPath for XML Navigation Janis Voigtl ander Technische Universit - - PowerPoint PPT Presentation
XPath for XML Navigation Janis Voigtl ander Technische Universit - - PowerPoint PPT Presentation
XPath for XML Navigation Janis Voigtl ander Technische Universit at Dresden Summer Term 2009 XPath for Tree Navigation: An Example Document: A B B C D D E F F E F F F F Query: /descendant::D/child::F[position()=1] XPath for
SLIDE 2
SLIDE 3
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 4
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 5
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 6
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 7
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 8
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 9
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 10
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 11
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 12
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 13
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 14
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 15
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 16
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 17
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 18
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 19
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 20
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 21
XPath for Tree Navigation: An Example
Document:
A B B C D D E E F F F F F F
Query: /descendant::D/child::F[position()=1]
SLIDE 22
XPath Expressions
Paths: /descendant::D/child::F[position()=1]
SLIDE 23
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D
SLIDE 24
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1]
SLIDE 25
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . .
SLIDE 26
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . .
SLIDE 27
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . . Filters: position()=1, . . .
SLIDE 28
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . . Filters: position()=1, . . . General syntax: path ::= step/ · · · /step | /step/ · · · /step
SLIDE 29
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . . Filters: position()=1, . . . General syntax: path ::= step/ · · · /step | /step/ · · · /step step ::= axis :: test[fexp] · · · [fexp]
SLIDE 30
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . . Filters: position()=1, . . . General syntax: path ::= step/ · · · /step | /step/ · · · /step step ::= axis :: test[fexp] · · · [fexp] test ::= name | node() | text() | · · ·
SLIDE 31
XPath Expressions
Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . . Tests: D, F, . . . Filters: position()=1, . . . General syntax: path ::= step/ · · · /step | /step/ · · · /step step ::= axis :: test[fexp] · · · [fexp] test ::= name | node() | text() | · · · fexp ::= · · ·
SLIDE 32
Axes, from a Context Node
SLIDE 33
Axes, from a Context Node
child
SLIDE 34
Axes, from a Context Node
descendant
SLIDE 35
Axes, from a Context Node
descendant-or-self
SLIDE 36
Axes, from a Context Node
parent
SLIDE 37
Axes, from a Context Node
ancestor
SLIDE 38
Axes, from a Context Node
ancestor-or-self
SLIDE 39
Axes, from a Context Node
following-sibling
SLIDE 40
Axes, from a Context Node
following
SLIDE 41
Axes, from a Context Node
preceding-sibling
SLIDE 42
Axes, from a Context Node
preceding
SLIDE 43
Axes, from a Context Node
self
SLIDE 44
Axes, from a Context Node
attribute
SLIDE 45
Abbreviated Syntax
/descendant-or-self::node()/ → //
SLIDE 46
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → .
SLIDE 47
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → ..
SLIDE 48
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: →
SLIDE 49
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @
SLIDE 50
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . .
SLIDE 51
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] →
SLIDE 52
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"]
SLIDE 53
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //child::box/child::item[attribute::color="yellow"]
SLIDE 54
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //child::box/child::item[attribute::color="yellow"]
SLIDE 55
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //box/item[attribute::color="yellow"]
SLIDE 56
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //box/item[attribute::color="yellow"]
SLIDE 57
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //box/item[@color="yellow"]
SLIDE 58
Abbreviated Syntax
/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . . Thus, for example: /descendant-or-self::node()/child::box/ child::item[attribute::color="yellow"] → //box/item[@color="yellow"]
SLIDE 59
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 60
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 61
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 62
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 63
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 64
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 65
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 66
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 67
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 68
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 69
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 70
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 71
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 72
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 73
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 74
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 75
Another Example
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box/item[@color="yellow"]
SLIDE 76
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 77
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 78
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 79
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 80
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 81
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 82
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item]
SLIDE 83
Paths as Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item] Note the difference to //box/item !
SLIDE 84
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 85
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 86
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 87
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 88
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 89
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 90
Nested Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //box[item[@color="yellow"]]
SLIDE 91
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 92
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 93
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 94
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 95
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 96
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 97
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: /descendant::item[1]
SLIDE 98
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 99
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 100
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 101
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 102
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 103
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 104
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 105
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 106
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 107
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 108
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 109
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 110
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1]
SLIDE 111
Tricky Abbreviations
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1] Note the difference to /descendant::item[1] !
SLIDE 112
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 113
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 114
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 115
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 116
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 117
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 118
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 119
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 120
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 121
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 122
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 123
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 124
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 125
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 126
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[1][@color="blue"]
SLIDE 127
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 128
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 129
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 130
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 131
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 132
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 133
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 134
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 135
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 136
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 137
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 138
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 139
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 140
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 141
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1]
SLIDE 142
Commutation of Filter Expressions
Document:
doc box box box item item item item item color=“blue” color=“green” color=“yellow” color=“blue” color=“yellow”
Query: //item[@color="blue"][1] Note the difference to //item[1][@color="blue"] !
SLIDE 143
Literature
- A. Møller and M.I. Schwartzbach.
An Introduction to XML and Web Technologies. Addison-Wesley, 2006.
- M. Benedikt and C. Koch.
XPath leashed. ACM Computing Surveys, to appear.
- G. Gottlob, C. Koch, and R. Pichler.
Efficient algorithms for processing XPath queries. ACM Transactions on Database Systems, 30:444–491, 2005. P.T. Wood. Minimising simple XPath expressions. Workshop on the Web and Databases, 2001.
- D. Olteanu, H. Meuss, T. Furche, and F. Bry.