X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fxpath%2Fast.ml;h=39777eb9c51c5ddc34af715938e4fbd8d49f30bb;hp=c3c00d9d1ee551f85f00290dd8658ff9b253084a;hb=e13f5deae217f945b44fa345ef4f0008e1780787;hpb=fadcbf2f6f9f33b844fd5e875a1bda4bed446a43 diff --git a/src/xpath/ast.ml b/src/xpath/ast.ml index c3c00d9..39777eb 100644 --- a/src/xpath/ast.ml +++ b/src/xpath/ast.ml @@ -14,7 +14,7 @@ (***********************************************************************) (* - Time-stamp: + Time-stamp: *) open Utils @@ -22,8 +22,13 @@ open Utils 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 (* true = descendant-or-self, false = descendant *) + | FollowingSibling + | Parent + | Ancestor of bool (* true = ancestor-or-self, false = ancestor *) + | PrecedingSibling + | Preceding | Following and test = QNameSet.t @@ -111,12 +116,12 @@ and print_axis fmt a = pp fmt "%s" begin match a with Self -> "self" | Child -> "child" - | Descendant -> "descendant" - | DescendantOrSelf -> "descendant-or-self" + | Descendant false -> "descendant" + | Descendant true -> "descendant-or-self" | FollowingSibling -> "following-sibling" | Attribute -> "attribute" - | Ancestor -> "ancestor" - | AncestorOrSelf -> "ancestor-or-self" + | Ancestor false -> "ancestor" + | Ancestor true -> "ancestor-or-self" | PrecedingSibling -> "preceding-sibling" | Parent -> "parent" | Preceding -> "preceding"