(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                            XML Query Engine                         *)
(*                                                                     *)
(*  Copyright 2000, Lucent Technologies.                               *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: path_struct.mli,v 1.4 2002/10/13 23:25:51 simeon Exp $ *)

(* This is our famous path structure
    - Jerome and Amelie *)

open Namespace
open Xquery_ast

(* Types for paths structures *) 

type path = (axis * cnode_test) list

type docid = string

type subtree =
  | Subtree
  | NoSubtree

type rooted_path = docid * path * subtree

type path_sequence = rooted_path list

val imposes_subtree : path_sequence -> path_sequence

(* New from here - Jerome *)

type path_fragment_sequence = (path * subtree) list

val inside_document : path_sequence -> docid -> path_fragment_sequence

type action =
  | GetSubtree
  | Stop
  | KeepMoving of path_fragment_sequence

val one_step : Namespace.nsenv -> Sax.sax_event -> path_fragment_sequence -> action

(* Printing of path structures *)

val print_path_sequence : path_sequence -> unit

