X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FgTopLevel%2FapplyStylesheets.ml;h=82060587acb91b31c06f8e0dee56fccde9cacd50;hb=9db3b8bbda8724f2b0fca7e84cecb68a5490c369;hp=3a81e8b86062bc5f1b258cf8ba9fe7faf3ed616d;hpb=3b1f8c2a9042fd9aae286262f167272b91016d8e;p=helm.git diff --git a/helm/gTopLevel/applyStylesheets.ml b/helm/gTopLevel/applyStylesheets.ml index 3a81e8b86..82060587a 100644 --- a/helm/gTopLevel/applyStylesheets.ml +++ b/helm/gTopLevel/applyStylesheets.ml @@ -44,14 +44,31 @@ let parseStyle name = Gdome_xslt.processStylesheet style ;; -let d_c = parseStyle "drop_coercions.xsl";; -let tc1 = parseStyle "objtheorycontent.xsl";; -let hc2 = parseStyle "content_to_html.xsl";; -let l = parseStyle "link.xsl";; +let parseStyles () = + parseStyle "drop_coercions.xsl", + parseStyle "objtheorycontent.xsl", + parseStyle "content_to_html.xsl", + parseStyle "link.xsl", + parseStyle "rootcontent.xsl", + parseStyle "genmmlid.xsl", + parseStyle "annotatedpres.xsl" +;; + +let (d_c,tc1,hc2,l,c1,g,c2) = + let (d_c,tc1,hc2,l,c1,g,c2) = parseStyles () in + ref d_c, ref tc1, ref hc2, ref l, ref c1, ref g, ref c2 +;; -let c1 = parseStyle "rootcontent.xsl";; -let g = parseStyle "genmmlid.xsl";; -let c2 = parseStyle "annotatedpres.xsl";; +let reload_stylesheets () = + let (d_c',tc1',hc2',l',c1',g',c2') = parseStyles () in + d_c := d_c'; + tc1 := tc1'; + hc2 := hc2'; + l := l' ; + c1 := c1' ; + g := g' ; + c2 := c2' +;; let getterURL = Configuration.getter_url;; @@ -100,7 +117,7 @@ let sequent_args = (** Stylesheets application **) let apply_stylesheets input styles args = - List.fold_left (fun i style -> Gdome_xslt.applyStylesheet i style args) + List.fold_left (fun i style -> Gdome_xslt.applyStylesheet i !style args) input styles ;;