XPath for XML Navigation Janis Voigtl ander Technische Universit - - PowerPoint PPT Presentation

xpath for xml navigation
SMART_READER_LITE
LIVE PREVIEW

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-1
SLIDE 1

XPath for XML Navigation

Janis Voigtl¨ ander

Technische Universit¨ at Dresden

Summer Term 2009

slide-2
SLIDE 2

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-3
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
SLIDE 22

XPath Expressions

Paths: /descendant::D/child::F[position()=1]

slide-23
SLIDE 23

XPath Expressions

Paths: /descendant::D/child::F[position()=1] Steps: descendant::D

slide-24
SLIDE 24

XPath Expressions

Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1]

slide-25
SLIDE 25

XPath Expressions

Paths: /descendant::D/child::F[position()=1] Steps: descendant::D child::F[position()=1] Axes: descendant, child, . . .

slide-26
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
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
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
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
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
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
SLIDE 32

Axes, from a Context Node

slide-33
SLIDE 33

Axes, from a Context Node

child

slide-34
SLIDE 34

Axes, from a Context Node

descendant

slide-35
SLIDE 35

Axes, from a Context Node

descendant-or-self

slide-36
SLIDE 36

Axes, from a Context Node

parent

slide-37
SLIDE 37

Axes, from a Context Node

ancestor

slide-38
SLIDE 38

Axes, from a Context Node

ancestor-or-self

slide-39
SLIDE 39

Axes, from a Context Node

following-sibling

slide-40
SLIDE 40

Axes, from a Context Node

following

slide-41
SLIDE 41

Axes, from a Context Node

preceding-sibling

slide-42
SLIDE 42

Axes, from a Context Node

preceding

slide-43
SLIDE 43

Axes, from a Context Node

self

slide-44
SLIDE 44

Axes, from a Context Node

attribute

slide-45
SLIDE 45

Abbreviated Syntax

/descendant-or-self::node()/ → //

slide-46
SLIDE 46

Abbreviated Syntax

/descendant-or-self::node()/ → // self::node() → .

slide-47
SLIDE 47

Abbreviated Syntax

/descendant-or-self::node()/ → // self::node() → . parent::node() → ..

slide-48
SLIDE 48

Abbreviated Syntax

/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: →

slide-49
SLIDE 49

Abbreviated Syntax

/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @

slide-50
SLIDE 50

Abbreviated Syntax

/descendant-or-self::node()/ → // self::node() → . parent::node() → .. child:: → attribute:: → @ position()= n → n . . .

slide-51
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.

XPath: Looking forward. Workshop on XML Data Management, 2002.