Statistiques
| Révision :

root / TXM / trunk / org.txm.rcp.updatesite / web / site.xsl @ 3618

Historique | Voir | Annoter | Télécharger (6,98 ko)

1 3618 mdecorde
<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl="urn:schemas-microsoft-com:xslt">
2 3618 mdecorde
<xsl:output method="html" encoding="UTF-8"/>
3 3618 mdecorde
<xsl:key name="cat" match="category" use="@name"/>
4 3618 mdecorde
<xsl:template match="/">
5 3618 mdecorde
<xsl:for-each select="site">
6 3618 mdecorde
	<html>
7 3618 mdecorde
	<head>
8 3618 mdecorde
	<title>org.txm.rcp.updatesite</title>
9 3618 mdecorde
	<style>@import url("web/site.css");</style>
10 3618 mdecorde
	</head>
11 3618 mdecorde
	<body>
12 3618 mdecorde
	<h1 class="title">org.txm.rcp.updatesite</h1>
13 3618 mdecorde
	<p class="bodyText"><xsl:value-of select="description"/></p>
14 3618 mdecorde
	<table width="100%" border="0" cellspacing="1" cellpadding="2">
15 3618 mdecorde
	<xsl:for-each select="category-def">
16 3618 mdecorde
		<xsl:sort select="@label" order="ascending" case-order="upper-first"/>
17 3618 mdecorde
		<xsl:sort select="@name" order="ascending" case-order="upper-first"/>
18 3618 mdecorde
	<xsl:if test="count(key('cat',@name)) != 0">
19 3618 mdecorde
			<tr class="header">
20 3618 mdecorde
				<td class="sub-header" width="30%">
21 3618 mdecorde
					<xsl:value-of select="@name"/>
22 3618 mdecorde
				</td>
23 3618 mdecorde
				<td class="sub-header" width="70%">
24 3618 mdecorde
					<xsl:value-of select="@label"/>
25 3618 mdecorde
				</td>
26 3618 mdecorde
			</tr>
27 3618 mdecorde
			<xsl:for-each select="key('cat',@name)">
28 3618 mdecorde
			<xsl:sort select="ancestor::feature//@version" order="ascending"/>
29 3618 mdecorde
			<xsl:sort select="ancestor::feature//@id" order="ascending" case-order="upper-first"/>
30 3618 mdecorde
			<tr>
31 3618 mdecorde
				<xsl:choose>
32 3618 mdecorde
				<xsl:when test="(position() mod 2 = 1)">
33 3618 mdecorde
					<xsl:attribute name="class">dark-row</xsl:attribute>
34 3618 mdecorde
				</xsl:when>
35 3618 mdecorde
				<xsl:otherwise>
36 3618 mdecorde
					<xsl:attribute name="class">light-row</xsl:attribute>
37 3618 mdecorde
				</xsl:otherwise>
38 3618 mdecorde
				</xsl:choose>
39 3618 mdecorde
				<td class="log-text" id="indent">
40 3618 mdecorde
						<xsl:choose>
41 3618 mdecorde
						<xsl:when test="ancestor::feature//@label">
42 3618 mdecorde
							<a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@label"/></a>
43 3618 mdecorde
							<br/>
44 3618 mdecorde
							<div id="indent">
45 3618 mdecorde
							(<xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/>)
46 3618 mdecorde
							</div>
47 3618 mdecorde
						</xsl:when>
48 3618 mdecorde
						<xsl:otherwise>
49 3618 mdecorde
						<a href="{ancestor::feature//@url}"><xsl:value-of select="ancestor::feature//@id"/> - <xsl:value-of select="ancestor::feature//@version"/></a>
50 3618 mdecorde
						</xsl:otherwise>
51 3618 mdecorde
						</xsl:choose>
52 3618 mdecorde
						<br />
53 3618 mdecorde
				</td>
54 3618 mdecorde
				<td>
55 3618 mdecorde
					<table>
56 3618 mdecorde
						<xsl:if test="ancestor::feature//@os">
57 3618 mdecorde
							<tr><td class="log-text" id="indent">Operating Systems:</td>
58 3618 mdecorde
							<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@os"/></td>
59 3618 mdecorde
							</tr>
60 3618 mdecorde
						</xsl:if>
61 3618 mdecorde
						<xsl:if test="ancestor::feature//@ws">
62 3618 mdecorde
							<tr><td class="log-text" id="indent">Windows Systems:</td>
63 3618 mdecorde
							<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@ws"/></td>
64 3618 mdecorde
							</tr>
65 3618 mdecorde
						</xsl:if>
66 3618 mdecorde
						<xsl:if test="ancestor::feature//@nl">
67 3618 mdecorde
							<tr><td class="log-text" id="indent">Languages:</td>
68 3618 mdecorde
							<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@nl"/></td>
69 3618 mdecorde
							</tr>
70 3618 mdecorde
						</xsl:if>
71 3618 mdecorde
						<xsl:if test="ancestor::feature//@arch">
72 3618 mdecorde
							<tr><td class="log-text" id="indent">Architecture:</td>
73 3618 mdecorde
							<td class="log-text" id="indent"><xsl:value-of select="ancestor::feature//@arch"/></td>
74 3618 mdecorde
							</tr>
75 3618 mdecorde
						</xsl:if>
76 3618 mdecorde
					</table>
77 3618 mdecorde
				</td>
78 3618 mdecorde
			</tr>
79 3618 mdecorde
			</xsl:for-each>
80 3618 mdecorde
			<tr><td class="spacer"><br/></td><td class="spacer"><br/></td></tr>
81 3618 mdecorde
		</xsl:if>
82 3618 mdecorde
	</xsl:for-each>
83 3618 mdecorde
	<xsl:if test="count(feature)  &gt; count(feature/category)">
84 3618 mdecorde
	<tr class="header">
85 3618 mdecorde
		<td class="sub-header" colspan="2">
86 3618 mdecorde
		Uncategorized
87 3618 mdecorde
		</td>
88 3618 mdecorde
	</tr>
89 3618 mdecorde
	</xsl:if>
90 3618 mdecorde
	<xsl:choose>
91 3618 mdecorde
	<xsl:when test="function-available('msxsl:node-set')">
92 3618 mdecorde
	   <xsl:variable name="rtf-nodes">
93 3618 mdecorde
		<xsl:for-each select="feature[not(category)]">
94 3618 mdecorde
			<xsl:sort select="@id" order="ascending" case-order="upper-first"/>
95 3618 mdecorde
			<xsl:sort select="@version" order="ascending" />
96 3618 mdecorde
			<xsl:value-of select="."/>
97 3618 mdecorde
			<xsl:copy-of select="." />
98 3618 mdecorde
		</xsl:for-each>
99 3618 mdecorde
	   </xsl:variable>
100 3618 mdecorde
	   <xsl:variable name="myNodeSet" select="msxsl:node-set($rtf-nodes)/*"/>
101 3618 mdecorde
	<xsl:for-each select="$myNodeSet">
102 3618 mdecorde
	<tr>
103 3618 mdecorde
		<xsl:choose>
104 3618 mdecorde
		<xsl:when test="position() mod 2 = 1">
105 3618 mdecorde
		<xsl:attribute name="class">dark-row</xsl:attribute>
106 3618 mdecorde
		</xsl:when>
107 3618 mdecorde
		<xsl:otherwise>
108 3618 mdecorde
		<xsl:attribute name="class">light-row</xsl:attribute>
109 3618 mdecorde
		</xsl:otherwise>
110 3618 mdecorde
		</xsl:choose>
111 3618 mdecorde
		<td class="log-text" id="indent">
112 3618 mdecorde
			<xsl:choose>
113 3618 mdecorde
			<xsl:when test="@label">
114 3618 mdecorde
				<a href="{@url}"><xsl:value-of select="@label"/></a>
115 3618 mdecorde
				<br />
116 3618 mdecorde
				<div id="indent">
117 3618 mdecorde
				(<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
118 3618 mdecorde
				</div>
119 3618 mdecorde
			</xsl:when>
120 3618 mdecorde
			<xsl:otherwise>
121 3618 mdecorde
				<a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
122 3618 mdecorde
			</xsl:otherwise>
123 3618 mdecorde
			</xsl:choose>
124 3618 mdecorde
			<br /><br />
125 3618 mdecorde
		</td>
126 3618 mdecorde
		<td>
127 3618 mdecorde
			<table>
128 3618 mdecorde
				<xsl:if test="@os">
129 3618 mdecorde
					<tr><td class="log-text" id="indent">Operating Systems:</td>
130 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
131 3618 mdecorde
					</tr>
132 3618 mdecorde
				</xsl:if>
133 3618 mdecorde
				<xsl:if test="@ws">
134 3618 mdecorde
					<tr><td class="log-text" id="indent">Windows Systems:</td>
135 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
136 3618 mdecorde
					</tr>
137 3618 mdecorde
				</xsl:if>
138 3618 mdecorde
				<xsl:if test="@nl">
139 3618 mdecorde
					<tr><td class="log-text" id="indent">Languages:</td>
140 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
141 3618 mdecorde
					</tr>
142 3618 mdecorde
				</xsl:if>
143 3618 mdecorde
				<xsl:if test="@arch">
144 3618 mdecorde
					<tr><td class="log-text" id="indent">Architecture:</td>
145 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
146 3618 mdecorde
					</tr>
147 3618 mdecorde
				</xsl:if>
148 3618 mdecorde
			</table>
149 3618 mdecorde
		</td>
150 3618 mdecorde
	</tr>
151 3618 mdecorde
	</xsl:for-each>
152 3618 mdecorde
	</xsl:when>
153 3618 mdecorde
	<xsl:otherwise>
154 3618 mdecorde
	<xsl:for-each select="feature[not(category)]">
155 3618 mdecorde
	<xsl:sort select="@id" order="ascending" case-order="upper-first"/>
156 3618 mdecorde
	<xsl:sort select="@version" order="ascending" />
157 3618 mdecorde
	<tr>
158 3618 mdecorde
		<xsl:choose>
159 3618 mdecorde
		<xsl:when test="count(preceding-sibling::feature[not(category)]) mod 2 = 1">
160 3618 mdecorde
		<xsl:attribute name="class">dark-row</xsl:attribute>
161 3618 mdecorde
		</xsl:when>
162 3618 mdecorde
		<xsl:otherwise>
163 3618 mdecorde
		<xsl:attribute name="class">light-row</xsl:attribute>
164 3618 mdecorde
		</xsl:otherwise>
165 3618 mdecorde
		</xsl:choose>
166 3618 mdecorde
		<td class="log-text" id="indent">
167 3618 mdecorde
			<xsl:choose>
168 3618 mdecorde
			<xsl:when test="@label">
169 3618 mdecorde
				<a href="{@url}"><xsl:value-of select="@label"/></a>
170 3618 mdecorde
				<br />
171 3618 mdecorde
				<div id="indent">
172 3618 mdecorde
				(<xsl:value-of select="@id"/> - <xsl:value-of select="@version"/>)
173 3618 mdecorde
				</div>
174 3618 mdecorde
			</xsl:when>
175 3618 mdecorde
			<xsl:otherwise>
176 3618 mdecorde
				<a href="{@url}"><xsl:value-of select="@id"/> - <xsl:value-of select="@version"/></a>
177 3618 mdecorde
			</xsl:otherwise>
178 3618 mdecorde
			</xsl:choose>
179 3618 mdecorde
			<br /><br />
180 3618 mdecorde
		</td>
181 3618 mdecorde
		<td>
182 3618 mdecorde
			<table>
183 3618 mdecorde
				<xsl:if test="@os">
184 3618 mdecorde
					<tr><td class="log-text" id="indent">Operating Systems:</td>
185 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@os"/></td>
186 3618 mdecorde
					</tr>
187 3618 mdecorde
				</xsl:if>
188 3618 mdecorde
				<xsl:if test="@ws">
189 3618 mdecorde
					<tr><td class="log-text" id="indent">Windows Systems:</td>
190 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@ws"/></td>
191 3618 mdecorde
					</tr>
192 3618 mdecorde
				</xsl:if>
193 3618 mdecorde
				<xsl:if test="@nl">
194 3618 mdecorde
					<tr><td class="log-text" id="indent">Languages:</td>
195 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@nl"/></td>
196 3618 mdecorde
					</tr>
197 3618 mdecorde
				</xsl:if>
198 3618 mdecorde
				<xsl:if test="@arch">
199 3618 mdecorde
					<tr><td class="log-text" id="indent">Architecture:</td>
200 3618 mdecorde
					<td class="log-text" id="indent"><xsl:value-of select="@arch"/></td>
201 3618 mdecorde
					</tr>
202 3618 mdecorde
				</xsl:if>
203 3618 mdecorde
			</table>
204 3618 mdecorde
		</td>
205 3618 mdecorde
	</tr>
206 3618 mdecorde
	</xsl:for-each>
207 3618 mdecorde
	</xsl:otherwise>
208 3618 mdecorde
	</xsl:choose>
209 3618 mdecorde
	</table>
210 3618 mdecorde
	</body>
211 3618 mdecorde
	</html>
212 3618 mdecorde
</xsl:for-each>
213 3618 mdecorde
</xsl:template>
214 3618 mdecorde
</xsl:stylesheet>