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

(* $Id: conf.mli,v 1.24 2002/12/10 16:50:37 simeon Exp $ *)

(* Module Conf
   Description:
     This module contains global variables and parameters changing the
     general behavior of the Galax interpretor.
*)

(***********************)
(* Version information *)
(***********************)

val system : string
    (* System name *)

val version : string
    (* Current version number *)

val copyright : string
    (* Copyright notice *)

val status : string
    (* This release's status *)

val motd : string
    (* Any additional notice *)


(**************************)
(* Galax library location *)
(**************************)

(* Is stdlib on or off? *)

val stdlib : bool ref

(* Where is the Galax library installed *)

val galax_library : string

(* Where is the standard library file *)

val pervasive_content : string ref


(***********************)
(* Behavior parameters *)
(***********************)

(* Processing phases behavior *)

val mapping : bool ref
    (* true when mapping is on.
       mapping is on by default *)

val typing : bool ref
    (* true when typing is on.
       typing is on by default *)

val projection : bool ref
    (* true when projection of document is on.
       projection is off by default *)

val optimized_projection : bool ref
    (* true when projection of document is on.
       projection is off by default *)

val optim : bool ref
    (* true when optimization is on.
       optimization is off by default *)

val eval : bool ref
    (* true when evaluation is on.
       evaluation is on by default *)

(* Debugging behavior *)

val debugging : bool ref
    (* true when debugging is on.
       debugging is off by default *)

(* Whitespace behavior *)

val whitespace : bool ref
     (* true if preserving whitespace in XQuery literal XML construction
	false if not preserving non-significant whitespace *)

val document_whitespace : bool ref
     (* true if preserving whitespace in input XML document
	false if not preserving non-significant whitespace *)

(* PI and Comments behavior *)

val pis_and_comments : bool ref
    (* true if preserving PI's and comments
       false if not preserving PI's and comments *)

(* Output behavior *)

val verbose : bool ref
    (* true if verbose output emitted  *)

val print_xml : bool ref
    (* true if core expression emitted *)
val xml_output : out_channel ref 
val xml_formatter : Format.formatter ref 

val print_expr : bool ref
    (* true if expression emitted *)
val expr_output : out_channel ref 
val expr_formatter : Format.formatter ref 

val print_type : bool ref
    (* true if type emitted *)
val type_output : out_channel ref
val type_formatter : Format.formatter ref

val print_core_expr : bool ref
    (* true if core expression emitted *)
val core_expr_output : out_channel ref
val core_expr_formatter : Format.formatter ref

val print_typed_expr : bool ref
    (* true if typed core expression emitted *)
val typed_expr_output : out_channel ref
val typed_expr_formatter : Format.formatter ref

val print_type_annotations : bool ref
    (* true if types of expressions are printed with the core *)

val print_optimized_expr : bool ref
    (* true if optimized core expression emitted *)
val optimized_expr_output : out_channel ref
val optimized_expr_formatter : Format.formatter ref

val print_projection : bool ref

val projection_output : out_channel ref
val projection_formatter : Format.formatter ref
    (* true when printing projection of document is on.
       off by default *)

val print_projected_file : bool ref
val projected_file_output : out_channel ref
val projected_file_formatter : Format.formatter ref

val serialize_xsi_type : bool ref

val serialize_wf : bool ref

val monitor : bool ref
val monitor_output : out_channel ref
val monitor_formatter : Format.formatter ref

val error_blocking : bool ref
    (* true if an error in a statement stops the overall execution,
       false if the system moves to the next statement in case of an
       error. true by default *)

(*********************)
(* Global parameters *)
(*********************)

(* XML & XML Schema namespaces *)

val emptyns  : string
 
val xmlns    : string
val xmlnsns  : string
val xsdns    : string
val xsns     : string
val xsins    : string
val fnns     : string
val opns     : string
val xqns     : string
val glxns    : string

(* Character encoding *)

type encoding_kind =
  | Utf8
  | Iso88591


val current_default_encoding : encoding_kind ref
val default_encoding : unit -> encoding_kind
val current_encoding : encoding_kind ref
val check_config : unit -> unit 

