Suggested by a post in the eXist mailing list
The task is to select a subset of items with a conditonal filter.
This is just a snippet of data. More realistically this would be a large document which was indexed.
The conditional expression can be used in a predicate but this would inhibit any indexes defined.
user defined functions can be used in a path expression but this would also inhibit index usage.
if there is a complex conditional predicate where we need to make best use of
the indexes, then we canconstruct the expression as a string and use util:eval to evaluate it. In this simple example, the execution line is longer