]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/uwobo/src/ocaml/uwobo_common.ml
moved uwobo sources to the root uwobo directory
[helm.git] / helm / uwobo / src / ocaml / uwobo_common.ml
diff --git a/helm/uwobo/src/ocaml/uwobo_common.ml b/helm/uwobo/src/ocaml/uwobo_common.ml
deleted file mode 100644 (file)
index 7664c93..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-(*
- * Copyright (C) 2003:
- *    Stefano Zacchiroli <zack@cs.unibo.it>
- *    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/
- *)
-
-open Printf;;
-
-exception Uwobo_failure of string;;
-
-let supported_properties = [
-  "cdata-section-elements";
-  "doctype-public";
-  "doctype-system";
-  "encoding";
-  "indent";
-  "media-type";
-  "method";
-  "omit-xml-declaration";
-  "standalone";
-  "version"
-]
-
-let is_supported_property name = List.mem name supported_properties
-
-let usage_string =
-  sprintf
-"
-<html>
-  <head>
-    <title>UWOBO's help message</title>
-  </head>
-  <body>
-    <p>
-    Usage: <kbd>http://hostname:uwoboport/</kbd><em>command</em>
-    </p>
-    <p>
-    Available commands:
-    </p>
-    <p>
-      <b><kbd>help</kbd></b><br />
-      display this help message
-    </p>
-    <p>
-      <b><kbd>add?bind=key,uri[&bind=key,uri[&...]]</kbd></b><br />
-      load a new stylesheet, specified by <em>uri</em>, and bind it to key
-          <em>key</em>
-    </p>
-    <p>
-      <b><kbd>remove[?keys=key1,key2,...]</kbd></b><br />
-      unload stylesheets specified by <em>key1, key2, ...</em> or all
-          stylesheets if no key was given
-    </p>
-    <p>
-      <b><kbd>reload[?keys=key1,key2,...]</kbd></b><br />
-      reload stylesheets specified by <em>key1, key2, ...</em> or all
-          stylesheets if no key was given
-    </p>
-    <p>
-      <b><kbd>list</kbd></b><br />
-      return a list of loaded stylesheets
-    </p>
-    <p>
-      <b><kbd>apply?xmluri=uri&keys=key1,key2,...[&param.name=value[&param.name=value[&...]]][&param.key.name=value[&param.key.name=value[&...]]][&prop.name[=value][&prop.name[=value][&...]]]</kbd></b><br />
-      apply a chain of stylesheets, specified by <em>key1, key2, ...</em>, to an
-      input document, specified by <em>uri</em>.<br />
-      Additional parameters can be set for each stylesheet application: global
-      parameters (i.e. parameters passed to all stylesheets) are set using
-      <em>param.name=value</em> syntax, per stylesheet parameters are set using
-      <em>param.key.name=value</em> where <em>key</em> is the key of a loaded
-      stylesheet.<br />
-      Properties of the final chain output can be set too: valueless properties
-      can be set using <em>prop.name</em> syntax, others can be set using
-      <em>prop.name=value</em> syntax.<br />
-      Current supported properties are: %s.
-    </p>
-  </body>
-</html>
-"
-  (String.concat ", " supported_properties);;
-
-let pp_error = sprintf "<html><body><h1>Error: %s</h1></body></html>";;
-let return_error msg outchan =
-  Http_daemon.respond ~body:(pp_error msg) outchan;;
-let bad_request body outchan =
-  Http_daemon.respond_error ~code:400 ~body outchan
-;;
-
-