]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/www/lambdadelta/bin/xhtbl/xhtbl.ml
- we begin the new site based on ld_web
[helm.git] / helm / www / lambdadelta / bin / xhtbl / xhtbl.ml
index cf4d818b6e919263d6d4c44fc164fd605b1810ae..f379185fafab3a8f4e4ac007a5e4fd59be720934 100644 (file)
@@ -12,18 +12,18 @@ module P3 = Pass3
 module M  = Matrix
 module XU = XmlUnparser
 
-let help    = ""
-let help_L  = ""
-let help_O  = ""
-let help_X  = ""
-let help_d0 = ""
-let help_d1 = ""
-let help_d2 = ""
-let help_e1 = ""
-let help_e2 = ""
-let help_p0 = ""
-let help_p1 = ""
-let help_p2 = ""
+let help    = "Usage: xhtbl [ -LX | -O <dir> | -d0 | -d1 | -d2 | -e1 | -e2 | -p0 | -p1 | -p2 | <file> ]*"
+let help_L  = " Output lexer tokens"
+let help_O  = "<dir>  Set this output directory"
+let help_X  = " Clear all options"
+let help_d0 = " Output table contents after phase zero (parsing)"
+let help_d1 = " Output table contents after phase one (sizing)"
+let help_d2 = " Output table contents after phase two (filling)"
+let help_e1 = " Disabled"
+let help_e2 = " Output debug information during phase two (filling)"
+let help_p0 = " Process until phase zero (parsing)"
+let help_p1 = " Process until phase one (sizing)"
+let help_p2 = " Process until phase two (filling)"
 
 let hook = "xhtbl"
 
@@ -51,9 +51,10 @@ let process_file fname =
    let bname = F.chop_extension (F.basename fname) in
    let ich = open_in fname in
    let lexbuf = Lexing.from_channel ich in
-   let ds = TP.script TL.token lexbuf in
+   let ns, ds = TP.script TL.token lexbuf in
    close_in ich; includes := bname :: !includes;
-   let och = XU.open_out true bname in 
+   let ns = ("", "http://www.w3.org/1999/xhtml") :: ns in
+   let och = XU.open_out bname ns in 
    L.iter (process_directive och bname) ds;
    XU.close_out och