Subversion Repositories XServices

Rev

Details | Last modification | View Log | RSS feed

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