- AXIS COLONCOLON test { let a, t = $1, $3 in
- if a == Attribute && Utils.QNameSet.is_finite t then
- (a, Utils.QNameSet.fold
- (fun t a ->
- Utils.QNameSet.add
- (Utils.QName.add_attribute_prefix t) a)
- t Utils.QNameSet.empty)
- else
- (a, t)
+ AXIS COLONCOLON test { let a, (t,k) = $1, $3 in
+ match a with
+ Attribute when Utils.QNameSet.is_finite t ->
+ [ a, ((Utils.QNameSet.fold
+ (fun t a ->
+ Utils.QNameSet.add
+ (Utils.QName.attribute t) a)
+ t Utils.QNameSet.empty), k) ]
+ | Preceding|Following ->
+ [ (Descendant true, (t,k));
+ if a == Preceding then
+ (PrecedingSibling, (node, NodeKind.Node))
+ else
+ (FollowingSibling, (node, NodeKind.Node));
+ (Ancestor true, (node, NodeKind.Node)) ]
+
+ | _ -> [ a, (t,k) ]