+++ /dev/null
-<html>\r
-<head>\r
-<title>CdmLibrary UpdateSite</title>\r
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\r
-<style>@import url("web/site.css");</style>\r
-<script type="text/javascript">\r
- var returnval = 0;\r
- var stylesheet, xmlFile, cache, doc;\r
- function init(){\r
- // NSCP 7.1+ / Mozilla 1.4.1+ / Safari\r
- // Use the standard DOM Level 2 technique, if it is supported\r
- if (document.implementation && document.implementation.createDocument) {\r
- xmlFile = document.implementation.createDocument("", "", null);\r
- stylesheet = document.implementation.createDocument("", "", null);\r
- if (xmlFile.load){\r
- xmlFile.load("site.xml");\r
- stylesheet.load("web/site.xsl");\r
- } else {\r
- alert("Document could not be loaded by browser.");\r
- }\r
- xmlFile.addEventListener("load", transform, false);\r
- stylesheet.addEventListener("load", transform, false);\r
- }\r
- //IE 6.0+ solution\r
- else if (window.ActiveXObject) {\r
- xmlFile = new ActiveXObject("msxml2.DOMDocument.3.0");\r
- xmlFile.async = false;\r
- xmlFile.load("site.xml");\r
- stylesheet = new ActiveXObject("msxml2.FreeThreadedDOMDocument.3.0");\r
- stylesheet.async = false;\r
- stylesheet.load("web/site.xsl");\r
- cache = new ActiveXObject("msxml2.XSLTemplate.3.0");\r
- cache.stylesheet = stylesheet;\r
- transformData();\r
- }\r
- }\r
- // separate transformation function for IE 6.0+\r
- function transformData(){\r
- var processor = cache.createProcessor();\r
- processor.input = xmlFile;\r
- processor.transform();\r
- data.innerHTML = processor.output;\r
- }\r
- // separate transformation function for NSCP 7.1+ and Mozilla 1.4.1+ \r
- function transform(){\r
- returnval+=1;\r
- if (returnval==2){\r
- var processor = new XSLTProcessor();\r
- processor.importStylesheet(stylesheet); \r
- doc = processor.transformToDocument(xmlFile);\r
- document.getElementById("data").innerHTML = doc.documentElement.innerHTML;\r
- }\r
- }\r
-</script>\r
-</head>\r
-<body onload="init();">\r
-<!--[insert static HTML here]-->\r
-<div id="data"><!-- this is where the transformed data goes --></div>\r
-</body>\r
-</html>\r
+++ /dev/null
-<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">\r
-<xsl:output method="html" encoding="UTF-8"/>\r
-<xsl:key name="cat" match="category" use="@name"/>\r
-<xsl:template match="/">\r
-<xsl:for-each select="site">\r
- <html>\r
- <head>\r
- <title>CdmLibrary UpdateSite</title>\r
- <style>@import url("web/site.css");</style>\r
- </head>\r
- <body>\r
- <h1 class="title">CdmLibrary UpdateSite</h1>\r
- <p class="bodyText"><xsl:value-of select="description"/></p>\r
- <table width="100%" border="0" cellspacing="1" cellpadding="2">\r
- <xsl:for-each select="category-def">\r
- <xsl:sort select="@label" order="ascending" case-order="upper-first"/>\r
- <xsl:sort select="@name" order="ascending" case-order="upper-first"/>\r
- <xsl:if test="count(key('cat',@name)) != 0">\r
- <tr class="header">\r
- <td class="sub-header" width="30%">\r
- <xsl:value-of select="@name"/>\r
- </td>\r
- <td class="sub-header" width="70%">\r
- <xsl:value-of select="@label"/>\r
- </td>\r
- </tr>\r
- <xsl:for-each select="key('cat',@name)">\r
- <xsl:sort select="ancestor::feature//@version" order="ascending"/>\r
- <xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>\r
- <tr>\r
- <xsl:choose>\r
- <xsl:when test="(position() mod 2 = 1)">\r
- <xsl:attribute name="class">dark-row</xsl:attribute>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:attribute name="class">light-row</xsl:attribute>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <td class="log-text" id="indent">\r
- <xsl:choose>\r
- <xsl:when test="ancestor::feature//@label">\r
- <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>\r
- <br/>\r
- <div id="indent">\r
- (<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)\r
- </div>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <br />\r
- </td>\r
- <td>\r
- <table>\r
- <xsl:if test="ancestor::feature//@os">\r
- <tr><td class="log-text" id="indent">Operating Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="ancestor::feature//@ws">\r
- <tr><td class="log-text" id="indent">Windows Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="ancestor::feature//@nl">\r
- <tr><td class="log-text" id="indent">Languages:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="ancestor::feature//@arch">\r
- <tr><td class="log-text" id="indent">Architecture:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>\r
- </tr>\r
- </xsl:if>\r
- </table>\r
- </td>\r
- </tr>\r
- </xsl:for-each>\r
- <tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>\r
- </xsl:if>\r
- </xsl:for-each>\r
- <xsl:if test="count(feature) > count(feature/category)">\r
- <tr class="header">\r
- <td class="sub-header" colspan="2">\r
- Uncategorized\r
- </td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:choose>\r
- <xsl:when test="function-available('msxsl:node-set')">\r
- <xsl:variable name="rtf-nodes">\r
- <xsl:for-each select="feature[not(category)]">\r
- <xsl:sort select="@id" order="ascending" case-order="upper-first"/>\r
- <xsl:sort select="@version" order="ascending" />\r
- <xsl:value-of select="."/>\r
- <xsl:copy-of select="." />\r
- </xsl:for-each>\r
- </xsl:variable>\r
- <xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>\r
- <xsl:for-each select="$myNodeSet">\r
- <tr>\r
- <xsl:choose>\r
- <xsl:when test="position() mod 2 = 1">\r
- <xsl:attribute name="class">dark-row</xsl:attribute>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:attribute name="class">light-row</xsl:attribute>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <td class="log-text" id="indent">\r
- <xsl:choose>\r
- <xsl:when test="@label">\r
- <a href="{@url}"><xsl:value-of select="@label"/></a>\r
- <br />\r
- <div id="indent">\r
- (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)\r
- </div>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <br /><br />\r
- </td>\r
- <td>\r
- <table>\r
- <xsl:if test="@os">\r
- <tr><td class="log-text" id="indent">Operating Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@ws">\r
- <tr><td class="log-text" id="indent">Windows Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@nl">\r
- <tr><td class="log-text" id="indent">Languages:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@arch">\r
- <tr><td class="log-text" id="indent">Architecture:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>\r
- </tr>\r
- </xsl:if>\r
- </table>\r
- </td>\r
- </tr>\r
- </xsl:for-each>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:for-each select="feature[not(category)]">\r
- <xsl:sort select="@id" order="ascending" case-order="upper-first"/>\r
- <xsl:sort select="@version" order="ascending" />\r
- <tr>\r
- <xsl:choose>\r
- <xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">\r
- <xsl:attribute name="class">dark-row</xsl:attribute>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <xsl:attribute name="class">light-row</xsl:attribute>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <td class="log-text" id="indent">\r
- <xsl:choose>\r
- <xsl:when test="@label">\r
- <a href="{@url}"><xsl:value-of select="@label"/></a>\r
- <br />\r
- <div id="indent">\r
- (<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)\r
- </div>\r
- </xsl:when>\r
- <xsl:otherwise>\r
- <a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- <br /><br />\r
- </td>\r
- <td>\r
- <table>\r
- <xsl:if test="@os">\r
- <tr><td class="log-text" id="indent">Operating Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@os"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@ws">\r
- <tr><td class="log-text" id="indent">Windows Systems:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@nl">\r
- <tr><td class="log-text" id="indent">Languages:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>\r
- </tr>\r
- </xsl:if>\r
- <xsl:if test="@arch">\r
- <tr><td class="log-text" id="indent">Architecture:</td>\r
- <td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>\r
- </tr>\r
- </xsl:if>\r
- </table>\r
- </td>\r
- </tr>\r
- </xsl:for-each>\r
- </xsl:otherwise>\r
- </xsl:choose>\r
- </table>\r
- </body>\r
- </html>\r
-</xsl:for-each>\r
-</xsl:template>\r
-</xsl:stylesheet>\r