-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdiagnostic.html
More file actions
58 lines (57 loc) · 1.37 KB
/
diagnostic.html
File metadata and controls
58 lines (57 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<!-- lightly modified from sample script at
http://www.w3schools.com/xsl/xsl_client.asp -->
<head>
<style>
td {
border: 1px solid black;
}
th {
background-color: rgb(80%,80%,80%);
}
</style>
<title>MALLET diagnostic output</title>
<script>
function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
else
{
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET",dname,false);
xhttp.send("");
return xhttp.responseXML;
}
function displayResult()
{
xml=loadXMLDoc("diagnostic.xml");
xsl=loadXMLDoc("diagnostic.xsl");
// code for IE
if (window.ActiveXObject)
{
ex=xml.transformNode(xsl);
document.getElementById("content").innerHTML=ex;
}
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
xsltProcessor=new XSLTProcessor();
xsltProcessor.importStylesheet(xsl);
resultDocument = xsltProcessor.transformToFragment(xml,document);
document.getElementById("content").appendChild(resultDocument);
}
}
</script>
</head>
<body onload="displayResult()">
<p>This looks for diagnostics from <code>mallet run cc.mallet.topics.tui.TopicTrainer --diagnostics-file</code> in a file called "diagnostic.xml"</p>
</p>
<div id="content">
</div>
</body>
</html>