X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_transformations%2FapplyStylesheets.ml;h=72f39ea4dc4ce72c93c082d7dd2b49205f6d90c0;hb=ac7687ce66526f905874ed99a845223c853c558a;hp=860a73297e59afc332ce3f983e082e90c3540ba9;hpb=cfaa4ba59014ccb6046a2a672e97a5e88d7d2946;p=helm.git diff --git a/helm/ocaml/cic_transformations/applyStylesheets.ml b/helm/ocaml/cic_transformations/applyStylesheets.ml index 860a73297..72f39ea4d 100644 --- a/helm/ocaml/cic_transformations/applyStylesheets.ml +++ b/helm/ocaml/cic_transformations/applyStylesheets.ml @@ -71,14 +71,11 @@ let reload_stylesheets () = ;; -let getterURL = Configuration.getter_url;; -let processorURL = Configuration.processor_url;; - let mml_styles = [d_c ; c1 ; g ; c2 ; l];; let mml_args ~explode_all = ("explodeall",(if explode_all then "true()" else "false()")):: - ["processorURL", "'" ^ processorURL ^ "'" ; - "getterURL", "'" ^ getterURL ^ "'" ; + ["processorURL", "'" ^ Helm_registry.get "uwobo.url" ^ "'" ; + "getterURL", "'" ^ Helm_registry.get "getter.url" ^ "'" ; "draw_graphURL", "'http%3A//phd.cs.unibo.it%3A8083/'" ; "uri_set_queueURL", "'http%3A//phd.cs.unibo.it%3A8084/'" ; "UNICODEvsSYMBOL", "'symbol'" ; @@ -95,9 +92,9 @@ let mml_args ~explode_all = ;; let sequent_styles = [d_c ; c1 ; g ; c2 ; l];; -let sequent_args = - ["processorURL", "'" ^ processorURL ^ "'" ; - "getterURL", "'" ^ getterURL ^ "'" ; +let sequent_args () = + ["processorURL", "'" ^ Helm_registry.get "uwobo.url" ^ "'" ; + "getterURL", "'" ^ Helm_registry.get "getter.url" ^ "'" ; "draw_graphURL", "'http%3A//phd.cs.unibo.it%3A8083/'" ; "uri_set_queueURL", "'http%3A//phd.cs.unibo.it%3A8084/'" ; "UNICODEvsSYMBOL", "'symbol'" ; @@ -126,26 +123,15 @@ let apply_proof_stylesheets proof_doc ~explode_all = ;; let apply_sequent_stylesheets sequent_doc = - apply_stylesheets sequent_doc sequent_styles sequent_args + apply_stylesheets sequent_doc sequent_styles (sequent_args ()) ;; (** Utility functions to map objects to MathML Presentation **) (*CSC: the getter should handle the innertypes, not the FS *) -let innertypesfile = - try - Sys.getenv "GTOPLEVEL_INNERTYPESFILE" - with - Not_found -> "/public/innertypes" -;; - -let constanttypefile = - try - Sys.getenv "GTOPLEVEL_CONSTANTTYPEFILE" - with - Not_found -> "/public/constanttype" -;; +let innertypesfile () = Helm_registry.get "gtoplevel.inner_types_file";; +let constanttypefile () = Helm_registry.get "gtoplevel.constant_type_file";; let mml_of_cic_sequent metasenv sequent = let sequent_gdome,ids_to_terms,ids_to_father_ids,ids_to_hypotheses = @@ -172,13 +158,13 @@ let match bodyxml with None -> Xml2Gdome.document_of_xml Misc.domImpl xml | Some bodyxml' -> - Xml.pp xml (Some constanttypefile) ; + Xml.pp xml (Some (constanttypefile ())) ; Xml2Gdome.document_of_xml Misc.domImpl bodyxml' in (*CSC: We save the innertypes to disk so that we can retrieve them in the *) (*CSC: stylesheet. This DOES NOT work when UWOBO and/or the getter are not *) (*CSC: local. *) - Xml.pp xmlinnertypes (Some innertypesfile) ; + Xml.pp xmlinnertypes (Some (innertypesfile ())) ; let output = apply_proof_stylesheets input ~explode_all in output ;;