-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
92 lines (83 loc) · 3.26 KB
/
index.html
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<html>
<head>
<title>org.eclipse.imp.update</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>@import url("web/site.css");</style>
<script type="text/javascript">
var transformDone = false;
var stylesheet, xmlFile;
function loadXMLDoc(url, callback) {
if (window.XMLHttpRequest) {
var req = new XMLHttpRequest();
function processReqChange() {
if (req.readyState == 4) { // only if req shows "loaded"
if (req.status == 200) { // only if "OK"
callback(req.responseXML);
} else {
alert("There was a problem retrieving the XML data:\n" + req.statusText);
}
}
}
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send(null);
}
}
function init() {
if (window.ActiveXObject) { // IE-only version
xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
xmlFile.async = false;
xmlFile.load("site.xml");
stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
stylesheet.async = false;
stylesheet.load("web/site.xsl");
cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
cache.stylesheet = stylesheet;
transformDataIE();
} else { // Safari and FireFox version
xmlFile = stylesheet = null;
transformDone = false;
loadXMLDoc("site.xml",
function(result) {
xmlFile = result;
transform();
}
);
loadXMLDoc("web/site.xsl",
function(result) {
stylesheet = result;
transform();
}
);
}
}
function transform() {
if (!transformDone && xmlFile && stylesheet) {
var processor = new XSLTProcessor();
processor.importStylesheet(stylesheet);
var doc = processor.transformToDocument(xmlFile);
var dataDivBody = document.getElementById("data");
// alert(new XMLSerializer().serializeToString(doc.documentElement.innerHTML));
dataDivBody.innerHTML = doc.documentElement.innerHTML;
transformDone = true;
}
}
function transformDataIE() { // separate transformation function for IE 6.0+
var processor = cache.createProcessor();
processor.input = xmlFile;
processor.transform();
data.innerHTML = processor.output;
}
</script>
</head>
<body onload="init();">
<h2>IMP Project Update Site</h2>
<p>This Eclipse update site hosts the distribution for the IMP IDE framework, and related components.<p><br>
<p>The IMP project page is located at <a href="http://www.eclipse.org/imp">http://www.eclipse.org/imp</a>.
<hr>
<h2>Using this Update Site</h2>
Simply go to the Eclipse Update Manager, create a new update site and enter this site's URL:<br>
<a HREF="http://download.eclipse.org/technology/imp/updates/">http://download.eclipse.org/technology/imp/updates/</a>
<div id="data"><!-- this is where the transformed data goes --></div>
</body>
</html>