(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                              XQuery Engine                          *)
(*                                                                     *)
(*  Copyright 2001-2003, Lucent Technologies.                          *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: load_context.mli,v 1.3 2003/06/09 15:28:26 simeon Exp $ *)

(* Module: Load_context
   Description:
     This module implements a the loading context.
*)


(**********************************)
(* A type for the loading context *)
(**********************************)

type load_context


(*********************************)
(* Creates a new loading context *)
(*********************************)

val build_load_context : Datatypes.xs_anyURI -> load_context


(********************************)
(* Accesses the loading context *)
(********************************)

val get_nsenv      : load_context -> Namespace.nsenv
val get_nodeid_gen : load_context -> Nodeid.nodeid_gen
val get_base_uri   : load_context -> Datatypes.xs_anyURI


(*******************************)
(* Operations on node identity *)
(*******************************)

val new_prefix : load_context -> Nodeid.prefix

val new_postfix : load_context -> Nodeid.postfix

val new_leaf_nodeid : load_context -> Nodeid.nodeid

val build_nodeid : load_context -> Nodeid.prefix -> Nodeid.postfix -> Nodeid.nodeid


(**************************************************)
(* Adds namespace bindings to the loading context *)
(**************************************************)

val add_ns_bindings : load_context -> (Namespace.prefix * Namespace.uri) list -> load_context

