Methods, systems, and computer program products for converting a single
expression referencing multiple branches within a hierarchical schema
into multiple expressions referencing a single branch of the hierarchical
schema. The single expression includes expression components that
identify branches within the hierarchical schema. Relative to a given
branch, any branches referenced by a given expression component are
identified. The identified branches are stored as new branches. If no
branch is identified, the current branch may be removed as inconsistent.
Storage for current branches is cleared, the new branches are copied to
the current branches, and the process is repeated for each expression
component. An expression component may include a predicate for
determining which branches are referenced. The predicate may include
predicate expressions that are converted to predicate branches and the
predicate may include predicate operators. Predicate operators are
combined with predicate branches to identify all branches referenced by
the predicate.