static/studio/update/2.x/index.html (59 lines of code) (raw):

<html> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <head> <title>studio-updatesite</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style>@import url("web/site.css");</style> <script type="text/javascript"> var returnval = 0; var stylesheet, xmlFile, cache, doc; function init(){ // NSCP 7.1+ / Mozilla 1.4.1+ / Safari // Use the standard DOM Level 2 technique, if it is supported if (document.implementation && document.implementation.createDocument) { xmlFile = document.implementation.createDocument("", "", null); stylesheet = document.implementation.createDocument("", "", null); if (xmlFile.load){ xmlFile.load("site.xml"); stylesheet.load("web/site.xsl"); } else { alert("Document could not be loaded by browser."); } xmlFile.addEventListener("load", transform, false); stylesheet.addEventListener("load", transform, false); } //IE 6.0+ solution else if (window.ActiveXObject) { 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; transformData(); } } // separate transformation function for IE 6.0+ function transformData(){ var processor = cache.createProcessor(); processor.input = xmlFile; processor.transform(); data.innerHTML = processor.output; } // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+ function transform(){ returnval+=1; if (returnval==2){ var processor = new XSLTProcessor(); processor.importStylesheet(stylesheet); doc = processor.transformToDocument(xmlFile); document.getElementById("data").innerHTML = doc.documentElement.innerHTML; } } </script> </head> <body onload="init();"> <!--[insert static HTML here]--> <div id="data"><!-- this is where the transformed data goes --></div> </body> </html>