(* * Copyright (C) 2003: * Stefano Zacchiroli * for the HELM Team http://helm.cs.unibo.it/ * * 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://helm.cs.unibo.it/ *) exception Stylesheet_not_found of string ;; exception Stylesheet_already_in of string ;; (** libxslt's message *) type xslt_msg = | LibXsltErrorMsg of string (** libxslt's error messages *) | LibXsltDebugMsg of string (** libxslt's debugging messages *) type log = xslt_msg list ;; (** hold UWOBO styles at runtime *) class styles: object (** {2 Stylesheets management} *) (** add a stylesheet, bound to a given key, to the UWOBO loaded stylesheets @param key key to which the stylesheets will be bound @param uri uri of the stylesheet to be loaded @raise Stylesheet_already_in if key is already bound *) method add: string -> string -> log (** remove the stylesheet bound to a given key *) method remove: string -> log (** remove all loaded stylesheet *) method removeAll: log (** reload the stylesheet bound to a given key *) method reload: string -> log (** reload all stylesheets *) method reloadAll: log (** {2 Stylesheets usage} *) (** @return the list of currently loaded stylesheets' keys *) method keys: string list (** @return a list of strings, each string is a textual representation of information related to a loaded stylesheet. This representation includes at least stylesheet's key and URI *) method list: string list (** @param key_list list of keys @return a pair. First component of the returned pair is an association list that maps given keys to gdome2-xslt processed stylesheets. Second component of the returned pair is an unprocessed version of the stylesheets corresponding to the latest key provided *) method get: string list -> (string * I_gdome_xslt.processed_stylesheet) list * Gdome.document end