From: Stefano Zacchiroli Date: Mon, 19 Apr 2004 12:07:12 +0000 (+0000) Subject: use PxpHelmConf module X-Git-Tag: dead_dir_walking~38 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6556d39b592c1e56b0e7f4055242232b8bfe3c90;p=helm.git use PxpHelmConf module --- diff --git a/helm/ocaml/registry/Makefile b/helm/ocaml/registry/Makefile index 84e86ec19..e6a861689 100644 --- a/helm/ocaml/registry/Makefile +++ b/helm/ocaml/registry/Makefile @@ -1,6 +1,6 @@ PACKAGE = registry -REQUIRES = str netstring pxp unix +REQUIRES = str netstring helm-pxp unix INTERFACE_FILES = helm_registry.mli IMPLEMENTATION_FILES = helm_registry.ml diff --git a/helm/ocaml/registry/helm_registry.ml b/helm/ocaml/registry/helm_registry.ml index 35273608f..0c7b43723 100644 --- a/helm/ocaml/registry/helm_registry.ml +++ b/helm/ocaml/registry/helm_registry.ml @@ -183,13 +183,13 @@ open Pxp_types open Pxp_yacc let save_to = - let dtd = new dtd default_config.warner `Enc_utf8 in + let dtd = new dtd PxpHelmConf.pxp_config.warner `Enc_utf8 in let dot_RE = Str.regexp "\\." in let create_key_node key value = (* create a value *) let element = - create_element_node ~valcheck:false default_spec dtd "key" ["name", key] + create_element_node ~valcheck:false PxpHelmConf.pxp_spec dtd "key" ["name", key] in - let data = create_data_node default_spec dtd value in + let data = create_data_node PxpHelmConf.pxp_spec dtd value in element#append_node data; element in @@ -211,7 +211,7 @@ let save_to = find ~deeply:false (is_section section) node with Not_found -> let section_node = - create_element_node ~valcheck:false default_spec dtd + create_element_node ~valcheck:false PxpHelmConf.pxp_spec dtd "section" ["name", section] in node#append_node section_node; @@ -223,7 +223,7 @@ let save_to = in fun fname -> let xml_root = - create_element_node ~valcheck:false default_spec dtd "helm_registry" [] + create_element_node ~valcheck:false PxpHelmConf.pxp_spec dtd "helm_registry" [] in Hashtbl.iter (fun key value -> @@ -250,7 +250,7 @@ let save_to = close_out outchan let load_from_absolute = - let config = default_config in + let config = PxpHelmConf.pxp_config in let entry = `Entry_document [ `Extend_dtd_fully; `Parse_xml_decl ] in let fold_key key_stack key = match key_stack with @@ -260,7 +260,7 @@ let load_from_absolute = fun fname -> debug_print ("Loading configuration from " ^ fname); let document = - parse_wfdocument_entity config (from_file fname) default_spec + parse_wfdocument_entity config (from_file fname) PxpHelmConf.pxp_spec in let rec aux key_stack node = node#iter_nodes (fun n ->