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

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

(* Module: Export_context
   Description:
     This module implements the context used during export from the
     data model to an XML stream.
*)

open Error

open Datamodel


(**********************)
(* The export context *)
(**********************)

type export_context


(********************************)
(* Creates a new export context *)
(********************************)

val build_export_context : Datamodel._Item list -> export_context


(************************************)
(* Operations on the export context *)
(************************************)

val get_current_sequence : export_context -> Datamodel._Item list

val replace_current_sequence : export_context -> Datamodel._Item list -> unit

val push_node_to_export_context : export_context -> Datamodel._Node  -> Datamodel._Item list -> unit

val pop_node_from_export_context : export_context -> (Sax_types.typed_sax_event * Datamodel._Item list) option

