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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="UTF-8"/>
<xsl:key name="modules" match="module" use="@level"/>
<xsl:template match="/">
<xsl:apply-templates select="dependencies"/>
</xsl:template>
<xsl:template match="dependencies">
<html>
<head>
<title>Summary for module <xsl:value-of select="@module"/>_<xsl:value-of select="@version"/></title>
</head>
<body>
<a name="top"></a><h1><xsl:value-of select="@module"/>_<xsl:value-of select="@version"/></h1>
<xsl:apply-templates select="ModuleList" mode="tableOfContent"/>
<xsl:apply-templates select="ModuleList" mode="orgContent"/>
<p align="right"><a href="#top">Top</a></p>
<hr/>
<xsl:apply-templates select="ModuleList" mode="extContent"/>
<p align="right"><a href="#top">Top</a></p>
</body>
</html>
</xsl:template>
<xsl:template match="ModuleList" mode="tableOfContent">
<font size="+1">Table of content</font><br/>
<xsl:for-each select="module[generate-id(.) = generate-id(key('modules', @level)[1])]">
<xsl:sort data-type="number" select="@level"/>
<a href="#Level{@level}">Level <xsl:value-of select="@level"/></a><br/>
</xsl:for-each>
<a href="#LevelExt">External Dependencies</a><br/>
<br/><hr/>
</xsl:template>
<xsl:template match="ModuleList" mode="extContent">
<span style="color: #000000; background-color: #FFFFFF">
<a name="LevelExt"> </a><b><font size="+2" color="#9966FF">External Dependencies</font></b>
</span><br/>
<table border="1" bordercolor="#9966FF">
<colgroup>
<col width="250"/>
<col width="80"/>
<col width="300"/>
<col width="120"/>
<col width="120"/>
</colgroup>
<tr bgcolor="#9966FF">
<th><span style="color : #FFFFFF; font-weight : bolder;">Module</span></th>
<th><font color="#FFFFFF">Version</font></th>
<th><font color="#FFFFFF">Dependencies</font></th>
<th><font color="#FFFFFF">Documentation</font></th>
<th><font color="#FFFFFF">Twiki</font></th>
</tr>
<xsl:for-each select="module[generate-id(.) = generate-id(key('modules', @level)[1])]">
<xsl:sort data-type="number" select="@level"/>
<xsl:apply-templates select="key('modules', @level)" mode="extContent"/>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="ModuleList" mode="orgContent">
<xsl:for-each select="module[generate-id(.) = generate-id(key('modules', @level)[1])]">
<xsl:sort data-type="number" select="@level"/>
<span style="color: #000000; background-color: #FFFFFF">
<a name="Level{@level}"> </a><b><font size="+2" color="#9966FF">Level <xsl:value-of select="@level"/></font></b>
</span><br/>
<table border="1" bordercolor="#9966FF">
<colgroup>
<col width="250"/>
<col width="80"/>
<col width="300"/>
<col width="120"/>
<col width="120"/>
</colgroup>
<tr bgcolor="#9966FF">
<th><span style="color : #FFFFFF; font-weight : bolder;">Module</span></th>
<th><font color="#FFFFFF">Version</font></th>
<th><font color="#FFFFFF">Dependencies</font></th>
<th><font color="#FFFFFF">Documentation</font></th>
<th><font color="#FFFFFF">Twiki</font></th>
</tr>
<xsl:apply-templates select="key('modules', @level)" mode="orgContent"/>
</table>
<br/><br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="module" mode="orgContent">
<xsl:variable name="Docs">http://docs.org.net/MTAdminDocumentation/DOCS/Components</xsl:variable>
<xsl:variable name="Twiki">https://phoenix.org.net/data/corp/rdteam/twiki/bin/view/RDteam/ComponentsList</xsl:variable>
<xsl:variable name="index">index.html</xsl:variable>
<xsl:variable name="versionSeparator">-</xsl:variable>
<xsl:if test="not(starts-with(@name,'ext'))">
<tr color="#000000" bgcolor="#CCCCFF">
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@version"/></td>
<td><xsl:apply-templates select="deliverables"/></td>
<xsl:choose>
<xsl:when test="string-length(@version) != 0">
<xsl:variable name="ModuleDoc">
<xsl:value-of select="$Docs"/>/<xsl:value-of select="@name"/>/<xsl:value-of select="substring-before(@version,$versionSeparator)"/>/<xsl:value-of select="substring-before(substring-after(@version,$versionSeparator),$versionSeparator)"/>/<xsl:value-of select="$index"/>
</xsl:variable>
<xsl:variable name="ModuleTwiki">
<xsl:value-of select="$Twiki"/>#<xsl:value-of select="@name"/>
</xsl:variable>
<td align="center">
<a href="{$ModuleDoc}">
Documentation
</a>
</td>
<td align="center">
<a href="{$ModuleTwiki}">
Twiki
</a>
</td>
</xsl:when>
<xsl:otherwise>
<td colspan="2"><font color="red">Incorrect version of the component.</font></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="module" mode="extContent">
<xsl:variable name="Docs">http://docs.org.net/MTAdminDocumentation/DOCS/Components</xsl:variable>
<xsl:variable name="Twiki">https://phoenix.org.net/data/corp/rdteam/twiki/bin/view/RDteam/ComponentsList</xsl:variable>
<xsl:variable name="index">index.html</xsl:variable>
<xsl:variable name="versionSeparator">-</xsl:variable>
<xsl:if test="starts-with(@name,'ext')">
<tr color="#000000" bgcolor="#CCCCFF">
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@version"/></td>
<td><xsl:apply-templates select="deliverables"/></td>
<xsl:choose>
<xsl:when test="string-length(@version) != 0">
<xsl:variable name="ModuleDoc">
<xsl:value-of select="$Docs"/>/<xsl:value-of select="@name"/>/<xsl:value-of select="substring-before(@version,$versionSeparator)"/>/<xsl:value-of select="substring-before(substring-after(@version,$versionSeparator),$versionSeparator)"/>/<xsl:value-of select="$index"/>
</xsl:variable>
<xsl:variable name="ModuleTwiki">
<xsl:value-of select="$Twiki"/>#<xsl:value-of select="@name"/>
</xsl:variable>
<td align="center">
<xsl:choose>
<xsl:when test="string-length(substring-after(substring-after(@version,$versionSeparator),$versionSeparator)) != 0">
<a href="{$ModuleDoc}">
Documentation
</a>
</xsl:when>
<xsl:otherwise>
<font color="red">A valid version need 3 digits</font>
</xsl:otherwise>
</xsl:choose>
</td>
<td align="center">
<a href="{$ModuleTwiki}">
Twiki
</a>
</td>
</xsl:when>
<xsl:otherwise>
<td colspan="2"><font color="red">Incorrect version of the component.</font></td>
</xsl:otherwise>
</xsl:choose>
</tr>
</xsl:if>
</xsl:template>
<xsl:template match="deliverables">
<xsl:for-each select="deliverable">
- <xsl:value-of select="@name"/><br/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet> |
Partager