Subversion Repositories XServices

Rev

Rev 36 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36 Rev 155
1
<html>
1
<html>
2
<head>
2
<head>
3
<title>Brutex Network Update Site</title>
3
<title>Brutex Network Update Site</title>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<style>@import url("web/site.css");</style>
5
<style>@import url("web/site.css");</style>
6
<script type="text/javascript">
6
<script type="text/javascript">
7
	var returnval = 0;
7
	var returnval = 0;
8
	var stylesheet, xmlFile, cache, doc;
8
	var stylesheet, xmlFile, cache, doc;
9
	function init(){
9
	function init(){
10
		// NSCP 7.1+ / Mozilla 1.4.1+ / Safari
10
		// NSCP 7.1+ / Mozilla 1.4.1+ / Safari
11
		// Use the standard DOM Level 2 technique, if it is supported
11
		// Use the standard DOM Level 2 technique, if it is supported
12
		if (document.implementation && document.implementation.createDocument) {
12
		if (document.implementation && document.implementation.createDocument) {
13
			xmlFile = document.implementation.createDocument("", "", null);
13
			xmlFile = document.implementation.createDocument("", "", null);
14
			stylesheet = document.implementation.createDocument("", "", null);
14
			stylesheet = document.implementation.createDocument("", "", null);
15
			if (xmlFile.load){
15
			if (xmlFile.load){
16
				xmlFile.load("site.xml");
16
				xmlFile.load("site.xml");
17
				stylesheet.load("web/site.xsl");
17
				stylesheet.load("web/site.xsl");
18
			} else {
18
			} else {
19
				alert("Document could not be loaded by browser.");
19
				alert("Document could not be loaded by browser.");
20
			}
20
			}
21
			xmlFile.addEventListener("load", transform, false);
21
			xmlFile.addEventListener("load", transform, false);
22
			stylesheet.addEventListener("load", transform, false);
22
			stylesheet.addEventListener("load", transform, false);
23
		}
23
		}
24
		//IE 6.0+ solution
24
		//IE 6.0+ solution
25
		else if (window.ActiveXObject) {
25
		else if (window.ActiveXObject) {
26
			xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
26
			xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");
27
			xmlFile.async = false;
27
			xmlFile.async = false;
28
			xmlFile.load("site.xml");
28
			xmlFile.load("site.xml");
29
			stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
29
			stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");
30
			stylesheet.async = false;
30
			stylesheet.async = false;
31
			stylesheet.load("web/site.xsl");
31
			stylesheet.load("web/site.xsl");
32
			cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
32
			cache = new ActiveXObject("msxml2.XSLTemplate.3.0");
33
			cache.stylesheet = stylesheet;
33
			cache.stylesheet = stylesheet;
34
			transformData();
34
			transformData();
35
		}
35
		}
36
	}
36
	}
37
	// separate transformation function for IE 6.0+
37
	// separate transformation function for IE 6.0+
38
	function transformData(){
38
	function transformData(){
39
		var processor = cache.createProcessor();
39
		var processor = cache.createProcessor();
40
		processor.input = xmlFile;
40
		processor.input = xmlFile;
41
		processor.transform();
41
		processor.transform();
42
		data.innerHTML = processor.output;
42
		data.innerHTML = processor.output;
43
	}
43
	}
44
	// separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+ 
44
	// separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+ 
45
	function transform(){
45
	function transform(){
46
		returnval+=1;
46
		returnval+=1;
47
		if (returnval==2){
47
		if (returnval==2){
48
			var processor = new XSLTProcessor();
48
			var processor = new XSLTProcessor();
49
			processor.importStylesheet(stylesheet); 
49
			processor.importStylesheet(stylesheet); 
50
			doc = processor.transformToDocument(xmlFile);
50
			doc = processor.transformToDocument(xmlFile);
51
			document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
51
			document.getElementById("data").innerHTML = doc.documentElement.innerHTML;
52
		}
52
		}
53
	}
53
	}
54
</script>
54
</script>
55
</head>
55
</head>
56
<body onload="init();">
56
<body onload="init();">
57
<!--[insert static HTML here]-->
57
<!--[insert static HTML here]-->
58
<div id="data"><!-- this is where the transformed data goes --></div>
58
<div id="data"><!-- this is where the transformed data goes --></div>
-
 
59
2014
59
</body>
60
</body>
60
</html>
61
</html>