An XML query compilation processor (20) includes an execution compiler
(42) that transforms an XML query into an executable XML query plan (22).
A query rewrite processor (34) performs query transformations on the XML
query. Said query transformations include transforming an expression
input (60) received by an expression (62) conditional upon a set of items
defined by an output (64) of the expression (62) being independent of
grouping of items in the expression input (60).