holds.
*)
-let compile_axis_test axis (test,kind) phi trans states=
+let compile_axis_test axis (test,kind) phi trans states =
let q = State.make () in
let phi = match kind with
Tree.NodeKind.Node -> phi
states)
| Descendant true ->
let q' = State.make () in
- (F.or_ (F.stay q) (F.first_child q'),
- (q', [ test => phi;
- QNameSet.any => F.first_child q' ++ F.next_sibling q';
- ])::
- (q, [ test => phi]):: trans,
+ (F.stay q ++ F.first_child q',
+ (q', [ QNameSet.any => F.stay q ++ F.first_child q' ++ F.next_sibling q';
+ ])::
+ (q, [ test => phi]):: trans,
states)
| Parent ->
(q' @: states))
| Ancestor self ->
- let q' = State.make () in
- let move = F.parent q ++ F.previous_sibling q' in
- (if self then F.stay q else move),
- (q, [ test => phi;
- QNameSet.any => move ])
- :: (q', [ QNameSet.any => move ]) :: trans,
- (q' @: states)
+ let q' = State.make () in
+ let move = F.parent q' ++ F.previous_sibling q' in
+ (if self then F.stay q ++ F.stay q' else F.stay q'),
+ (q', [ QNameSet.any => move ++ F.parent q])
+ :: (q, [ test => phi ]) :: trans,
+ (q' @: states)
| FollowingSibling | PrecedingSibling ->
let move =