(* Copyright (C) 2000-2002, HELM Team. * * This file is part of HELM, an Hypertextual, Electronic * Library of Mathematics, developed at the Computer Science * Department, University of Bologna, Italy. * * HELM is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * HELM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HELM; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * * For details, see the HELM World-Wide-Web page, * http://cs.unibo.it/helm/. *) (******************************************************************************) (* *) (* PROJECT HELM *) (* *) (* Claudio Sacerdoti Coen *) (* 30/01/2002 *) (* *) (* *) (******************************************************************************) let parseStyle name = let style = Misc.domImpl#createDocumentFromURI (* ~uri:("http://phd.cs.unibo.it:8081/getxslt?uri=" ^ name) ?mode:None *) ~uri:("styles/" ^ name) () in 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 c1 = parseStyle "rootcontent.xsl";; let g = parseStyle "genmmlid.xsl";; let c2 = parseStyle "annotatedpres.xsl";; 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 ^ "'" ; "draw_graphURL", "'http%3A//phd.cs.unibo.it%3A8083/'" ; "uri_set_queueURL", "'http%3A//phd.cs.unibo.it%3A8084/'" ; "UNICODEvsSYMBOL", "'symbol'" ; "doctype-public", "'-//W3C//DTD%20XHTML%201.0%20Transitional//EN'" ; "encoding", "'iso-8859-1'" ; "media-type", "'text/html'" ; "keys", "'d_c%2CC1%2CG%2CC2%2CL'" ; "interfaceURL", "'http%3A//phd.cs.unibo.it/helm/html/cic/index.html'" ; "naturalLanguage", "'yes'" ; "annotations", "'no'" ; "URLs_or_URIs", "'URIs'" ; "topurl", "'http://phd.cs.unibo.it/helm'" ; "CICURI", "'cic:/Coq/Init/Datatypes/bool_ind.con'" ] ;; let sequent_styles = [d_c ; c1 ; g ; c2 ; l];; let sequent_args = ["processorURL", "'" ^ processorURL ^ "'" ; "getterURL", "'" ^ getterURL ^ "'" ; "draw_graphURL", "'http%3A//phd.cs.unibo.it%3A8083/'" ; "uri_set_queueURL", "'http%3A//phd.cs.unibo.it%3A8084/'" ; "UNICODEvsSYMBOL", "'symbol'" ; "doctype-public", "'-//W3C//DTD%20XHTML%201.0%20Transitional//EN'" ; "encoding", "'iso-8859-1'" ; "media-type", "'text/html'" ; "keys", "'d_c%2CC1%2CG%2CC2%2CL'" ; "interfaceURL", "'http%3A//phd.cs.unibo.it/helm/html/cic/index.html'" ; "naturalLanguage", "'no'" ; "annotations", "'no'" ; "explodeall", "true()" ; "URLs_or_URIs", "'URIs'" ; "topurl", "'http://phd.cs.unibo.it/helm'" ; "CICURI", "'cic:/Coq/Init/Datatypes/bool_ind.con'" ] ;; let apply_stylesheets input styles args = List.fold_left (fun i style -> Gdome_xslt.applyStylesheet i style args) input styles ;; let apply_proof_stylesheets proof_doc ~explode_all = apply_stylesheets proof_doc mml_styles (mml_args ~explode_all) ;; let apply_sequent_stylesheets sequent_doc = apply_stylesheets sequent_doc sequent_styles sequent_args ;;