let filename = libdir uid ^ "/" ^ (cgi # argument_value "file") in
prerr_endline ("reading file " ^ filename);
let body =
- (* Netencoding.Html.encode ~in_enc:`Enc_utf8 ~prefer_name:false ()
+ Netencoding.Html.encode ~in_enc:`Enc_utf8 ~prefer_name:false ()
(html_of_matita (read_file filename)) in
- *)
- html_of_matita (read_file filename) in
+
+ (* html_of_matita (read_file filename) in *)
prerr_endline ("sending:\nBEGIN\n" ^ body ^ "\nEND");
- let body = "<file>" ^ body ^ "</file>" in
+ let body = "<response><file>" ^ body ^ "</file></response>" in
let baseuri, incpaths =
try
let root, baseuri, _fname, _tgt =
{
if (is_defined(xml)) {
locked.innerHTML = "";
- debug(xml.documentElement.textContent);
- unlocked.innerHTML = xml.documentElement.textContent;
+ debug(xml.getElementsByTagName("file")[0].childNodes[0].nodeValue);
+ unlocked.innerHTML = xml.getElementsByTagName("file")[0].childNodes[0].nodeValue;
+
} else {
debug("file open failed");
}