X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fwww%2Flambda_delta%2Fbin%2Fxhtbl%2FxmlUnparser.ml;fp=helm%2Fwww%2Flambda_delta%2Fbin%2Fxhtbl%2FxmlUnparser.ml;h=0000000000000000000000000000000000000000;hb=207a37632296335aa8db7b22482f91634f74e4e1;hp=3583c2f7536e95d045a4dd0776bbf81d4169b8c2;hpb=691c330235597faab8ad7be34242bc545d4c4023;p=helm.git diff --git a/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml b/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml deleted file mode 100644 index 3583c2f75..000000000 --- a/helm/www/lambda_delta/bin/xhtbl/xmlUnparser.ml +++ /dev/null @@ -1,82 +0,0 @@ -module A = Array -module F = Filename -module L = List -module P = Printf -module S = String - -module O = Options -module T = Table -module M = Matrix - -let i = 0 - -let myself = F.basename (Sys.argv.(0)) - -let msg = P.sprintf "This file was generated by %s, do not edit" myself - -let border cell = - let str = S.make 4 'n' in - if cell.M.cb.T.n then str.[0] <- 's'; - if cell.M.cb.T.e then str.[1] <- 's'; - if cell.M.cb.T.s then str.[2] <- 's'; - if cell.M.cb.T.w then str.[3] <- 's'; - str :: cell.M.cc - -let key cell = - if cell.M.ck = [] then "
" else S.concat " " cell.M.ck - -let ind i = S.make (2 * i) ' ' - -let out_cell och cell = - let cc = border cell in - P.fprintf och "%s%s\n" - (ind (i+4)) (S.concat " " cc) (key cell) - -let out_row och row = - P.fprintf och "%s\n" (ind (i+3)); - A.iter (out_cell och) row; - P.fprintf och "%s\n" (ind (i+3)) - -(****************************************************************************) - -let open_out html name = - let fname = F.concat !O.output_dir (P.sprintf "%s.xsl" name) in - let och = open_out fname in - P.fprintf och "\n\n"; - P.fprintf och "\n\n" msg; - P.fprintf och "\n\n"; - och - -let output och name matrix = - P.fprintf och "\n" name; - P.fprintf och "%s\n" (ind (i+1)); - P.fprintf och "%s\n" (ind (i+2)); - A.iter (out_row och) matrix.M.m; - P.fprintf och "%s\n" (ind (i+2)); - P.fprintf och "%s
\n" (ind (i+1)); - P.fprintf och "
\n\n" - -let close_out och = - P.fprintf och "
\n"; - close_out och - -let map_incs och name = - P.fprintf och "\n" name - -let map_tbls och name = - P.fprintf och "%s\n" (ind (i+2)) name; - P.fprintf och "%s\n" (ind (i+3)) name; - P.fprintf och "%s\n" (ind (i+2)) - -let write_hook name incs tbls = - let och = open_out false name in - L.iter (map_incs och) incs; - P.fprintf och "\n\n" name; - P.fprintf och "%s\n" (ind (i+1)); - L.iter (map_tbls och) tbls; - P.fprintf och "%s\n" (ind (i+1)); - P.fprintf och "\n\n"; - close_out och