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