Create and possibly filter item sequence.
A GeneralStep
can be part of a step expression. It consists
of a primary expression that may be followed by a predicate expression
(StepQualifiers
). If a predicate expression is used, it selects
one or more items.
The simplest form of a GeneralStep
consisting only of a
primary expression that turns out to be a numeric literal:
42
Get a unique list of all doctors whose pager number start with "3":
let $a := input()/descendant::doctor[starts-with(@pager, "3")] return distinct-values($a/name/surname)
In this example, $a
is a GeneralStep
.
The other three occurrences are simple primary expressions: the first is a variable name ("$a") and the others are QNames.
The following construct(s) refer to this construct: