Add a kind element to the node tree. Improve support for XPath by
[tatoo.git] / src / xpath / ast.mli
index f2a4df7..0fc63d4 100644 (file)
 (***********************************************************************)
 
 (*
-  Time-stamp: <Last modified on 2013-02-07 09:35:40 CET by Kim Nguyen>
+  Time-stamp: <Last modified on 2013-03-13 10:59:27 CET by Kim Nguyen>
 *)
 
 type path = single_path list
 and single_path = Absolute of step list | Relative of step list
 and step = axis * test * expr list
-and axis = Self | Attribute | Child | Descendant | DescendantOrSelf | FollowingSibling
-           | Parent | Ancestor | AncestorOrSelf | PrecedingSibling | Preceding | Following
+and axis = Self | Attribute | Child
+           | Descendant of bool
+           | FollowingSibling
+           | Parent
+           | Ancestor of bool
+           | PrecedingSibling
+           | Preceding | Following
 
-and test = Utils.QNameSet.t
+and test = Utils.QNameSet.t * Tree.Common.NodeKind.t
 
 and binop = Eq | Neq | Lt | Gt | Lte | Gte | Or | And | Add | Sub | Mult | Div | Mod
 and unop =  Neg
@@ -47,3 +52,4 @@ val print_axis : Format.formatter -> axis -> unit
 val print_test : Format.formatter -> test -> unit
 val print_expr : Format.formatter -> expr -> unit
 
+val invert_axis : axis -> axis