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

(* $Id: conf.mli,v 1.35 2003/06/27 20:34:24 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 *)

(* Normalization and evaluation behavior *)
val do_sbdo : bool ref

(* Debugging behavior *)

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

(* Whitespace behavior *)

val xquery_whitespace : bool ref
     (* true if preserving boundary whitespace in element construction
	false if not preserving boundary whitespace in element construction *)

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

(* PI and Comments behavior *)

val xml_pis_and_comments : bool ref
    (* true if preserving PI's and comments in input XML documents
       false if not preserving PI's and comments *)

(* Output behavior *)

val print_module        : bool ref

val pretty_print        : bool ref
val pretty_print_output : out_channel ref
val pretty_print_formatter : Format.formatter ref

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

val verbose_error : bool ref
    (* true is full error message is emitted *)

val xml_charescape_fn : (string -> string) ref
    (* function for escaping characters in XML output and expressions *)

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

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

val print_type : bool ref
    (* true if type emitted *)
val type_output : out_channel ref
val type_formatter : Format.formatter ref
val type_header : string ref 
val type_footer : string 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 core_expr_header : string ref
val core_expr_footer : string 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 typed_expr_header : string ref 
val typed_expr_footer : string 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 optimized_expr_header : string ref 
val optimized_expr_footer : string 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

type serialization_kind =
  | Serialize_As_Well_Formed
  | Serialize_As_XQuery
  | Serialize_As_Canonical

val serialize : serialization_kind ref

val serialize_id : bool ref

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

val glx_stderr : out_channel ref

(*********************)
(* 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 xdtns    : string
val xqns     : string
val glxns    : string

