Sequences Take Predicates
(called filter expressions)
- Like predicates on paths, they filter sequences using “
[ ]
”
- if item is true, it passes through
- if item not true, it is omitted
- original order is retained
- Predicates come in two styles
- numeric $seq[3]
- boolean $seq[position() eq 3]