An improved type inference may be calculated for a path expression that
may be classified into a series of input expressions followed by steps.
For each such series, the inference may be calculated based on input
including a type for the input expression, an axis for the step, and a
node test for the step. The cardinality of the input expression type is
preserved for the calculation of the step type. Also, a set of one or
more matching node types may be identified within the type repository.
These matching node types are node types within the axis of the step that
match the node test of the step. These matching node types are identified
without calculating the full content type implied by the axis. Avoiding
the calculation of the full content type of the axis may reduce the
processing time required to perform the inference.