]> matita.cs.unibo.it Git - helm.git/commitdiff
- added helm_ns and xhtml_ns (XHTML and HELM namespace, respectively)
authorStefano Zacchiroli <zack@upsilon.cc>
Mon, 17 Jan 2005 16:24:22 +0000 (16:24 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Mon, 17 Jan 2005 16:24:22 +0000 (16:24 +0000)
- changed usage string so that it is a well fermod XHTML document (added
  namespace, quoted ampersands)

helm/ocaml/getter/http_getter_const.ml
helm/ocaml/getter/http_getter_const.mli

index c31942ea9cfb4812f04fb1a607ef9862f1cd4e83..944fc3ecab4e66ace659052edabb166a9d25a11d 100644 (file)
@@ -31,11 +31,14 @@ open Printf;;
 let version = "0.3.0"
 let conffile = "http_getter.conf.xml"
 
+let xhtml_ns = "http://www.w3.org/1999/xhtml"
+let helm_ns = "http://www.cs.unibo.it/helm"
+
   (* TODO provide a better usage string *)
 let usage_string configuration =
   sprintf
-"
-<html>
+"<?xml version=\"1.0\"?>
+<html xmlns=\"%s\" xmlns:helm=\"%s\">
   <head>
     <title>HTTP Getter's help message</title>
   </head>
@@ -53,25 +56,25 @@ let usage_string configuration =
       display this help message
     </p>
     <p>
-      <b><kbd>getxml?uri=URI[&format=(normal|gz)][&patch_dtd=(yes|no)]</kbd></b><br />
+      <b><kbd>getxml?uri=URI[&amp;format=(normal|gz)][&amp;patch_dtd=(yes|no)]</kbd></b><br />
     </p>
     <p>
-      <b><kbd>register?uri=URI&url=URL</kbd></b><br />
+      <b><kbd>register?uri=URI&amp;url=URL</kbd></b><br />
     </p>
     <p>
       <b><kbd>resolve?uri=URI</kbd></b><br />
     </p>
     <p>
-      <b><kbd>getdtd?uri=URI[&patch_dtd=(yes|no)]</kbd></b><br />
+      <b><kbd>getdtd?uri=URI[&amp;patch_dtd=(yes|no)]</kbd></b><br />
     </p>
     <p>
-      <b><kbd>getxslt?uri=URI[&patch_dtd=(yes|no)]</kbd></b><br />
+      <b><kbd>getxslt?uri=URI[&amp;patch_dtd=(yes|no)]</kbd></b><br />
     </p>
     <p>
       <b><kbd><a href=\"/list_servers\">list_servers</a></kbd></b><br />
     </p>
     <p>
-      <b><kbd>add_server?url=URL&position=POSITION</kbd></b><br />
+      <b><kbd>add_server?url=URL&amp;position=POSITION</kbd></b><br />
     </p>
     <p>
       <b><kbd>remove_server?position=POSITION</kbd></b><br />
@@ -89,7 +92,7 @@ let usage_string configuration =
       <b><kbd><a href=\"/getallrdfuris\">getallrdfuris</a></kbd></b><br />
     </p>
     <p>
-      <b><kbd>ls?baseuri=regexp&format=(txt|xml)</kbd></b><br />
+      <b><kbd>ls?baseuri=regexp&amp;format=(txt|xml)</kbd></b><br />
     </p>
     <p>
       <b><kbd><a href=\"/getempty\">getempty</a></kbd></b><br />
@@ -99,7 +102,8 @@ let usage_string configuration =
   </body>
 </html>
 "
-    version configuration
+  xhtml_ns helm_ns
+  version configuration
 
 let empty_xml =
 "<?xml version=\"1.0\"?>
index 894ccd645db914dcaa6d956b792aa6e5c079c66c..d532313f08b3dcd4a341b14a54ed0baf208eb63a 100644 (file)
@@ -30,6 +30,9 @@ val version: string
 val conffile: string
 val empty_xml: string
 
+val helm_ns: string     (** helm namespace *)
+val xhtml_ns: string    (** xhtml namespace *)
+
   (** @return an HTML usage string including configuration information passed as
   input parameter *)
 val usage_string: string -> string