Line 0
Link Here
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor |
3 |
license agreements. See the NOTICE file distributed with this work for additional |
4 |
information regarding copyright ownership. The ASF licenses this file to |
5 |
You under the Apache License, Version 2.0 (the "License"); you may not use |
6 |
this file except in compliance with the License. You may obtain a copy of |
7 |
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required |
8 |
by applicable law or agreed to in writing, software distributed under the |
9 |
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS |
10 |
OF ANY KIND, either express or implied. See the License for the specific |
11 |
language governing permissions and limitations under the License. --> |
12 |
<!-- Content Stylesheet for "jmeter-site" --> |
13 |
|
14 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
15 |
version="3.0" |
16 |
> |
17 |
|
18 |
<!-- Defined parameters (overrideable) --> |
19 |
<xsl:param name="relative-path" select="'.'" /> |
20 |
<xsl:param name="subdir" select="''" /> |
21 |
<xsl:param name="imgdir" select="concat($relative-path, '/images')" /> |
22 |
<xsl:param name="sshotdir" select="concat($imgdir, '/screenshots')" /> |
23 |
<xsl:param name="cssdir" select="concat($relative-path, '/css')" /> |
24 |
<xsl:param name="jakarta-site" select="'http://jakarta.apache.org'" /> |
25 |
<xsl:param name="year" select="'2015'" /> |
26 |
|
27 |
<!-- Output method --> |
28 |
<xsl:output method="html" html-version="5.0" encoding="iso-8859-15" |
29 |
indent="no" doctype-system="about:legacy-compat" /> |
30 |
|
31 |
<xsl:template match="document"> |
32 |
<xsl:variable name="project" select="document('project.xml')/project" /> |
33 |
<html lang="en"> |
34 |
<head> |
35 |
<title> |
36 |
<xsl:value-of select="$project/title" /> |
37 |
- |
38 |
<xsl:value-of select="properties/title" /> |
39 |
</title> |
40 |
<xsl:for-each select="properties/author"> |
41 |
<xsl:variable name="name"> |
42 |
<xsl:value-of select="." /> |
43 |
</xsl:variable> |
44 |
<xsl:variable name="email"> |
45 |
<xsl:value-of select="@email" /> |
46 |
</xsl:variable> |
47 |
<meta name="author" value="{$name}" /> |
48 |
<meta name="email" value="{$email}" /> |
49 |
</xsl:for-each> |
50 |
<!-- VIEWPORT --> |
51 |
<meta name="viewport" content="width=device-width, initial-scale=1" /> |
52 |
<link |
53 |
href='http://fonts.googleapis.com/css?family=Special+Elite:400normal' |
54 |
rel='stylesheet' type='text/css' |
55 |
></link> |
56 |
<link rel="stylesheet" type="text/css" href="{concat($cssdir, '/new-style.css')}"></link> |
57 |
</head> |
58 |
<body role="document"> |
59 |
<div class="header"> |
60 |
<xsl:comment> |
61 |
APACHE LOGO |
62 |
</xsl:comment> |
63 |
<span> |
64 |
<a href="http://www.apache.org"> |
65 |
<img title="Apache Software Foundation" width="290" |
66 |
height="75" src="{$imgdir}/asf-logo.png" alt="Logo ASF" /> |
67 |
</a> |
68 |
</span> |
69 |
<xsl:if test="$project/logo"> |
70 |
<xsl:variable name="alt"> |
71 |
<xsl:value-of select="$project/logo" /> |
72 |
</xsl:variable> |
73 |
<xsl:variable name="home"> |
74 |
<xsl:value-of select="$project/@href" /> |
75 |
</xsl:variable> |
76 |
<xsl:variable name="src"> |
77 |
<xsl:value-of |
78 |
select="concat($relative-path, $project/logo/@href)" /> |
79 |
</xsl:variable> |
80 |
<xsl:comment> |
81 |
PROJECT LOGO |
82 |
</xsl:comment> |
83 |
<span> |
84 |
<a href="{$home}"> |
85 |
<img src="{$src}" alt="{$alt}" /> |
86 |
</a> |
87 |
</span> |
88 |
</xsl:if> |
89 |
<span> |
90 |
<a href="https://twitter.com/share" class="twitter-share-button" |
91 |
data-text="Powerful Load Testing with Apache #JMeter" |
92 |
data-via="ApacheJMeter" data-lang="en-gb" data-size="large" |
93 |
>Tweet</a> |
94 |
<script><![CDATA[ |
95 |
(function(d,s,id){ |
96 |
var js, |
97 |
fjs=d.getElementsByTagName(s)[0], |
98 |
p=/^http:/.test(d.location)?'http':'https'; |
99 |
if (!d.getElementById(id)) { |
100 |
js=d.createElement(s); |
101 |
js.id=id; |
102 |
js.src=p+'://platform.twitter.com/widgets.js'; |
103 |
fjs.parentNode.insertBefore(js,fjs); |
104 |
} |
105 |
})(document, 'script', 'twitter-wjs');]]> |
106 |
</script> |
107 |
<a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" |
108 |
data-show-count="false" data-lang="en-gb" data-size="large" |
109 |
>Follow</a> |
110 |
<script><![CDATA[(function(d,s,id){ |
111 |
var js, |
112 |
fjs=d.getElementsByTagName(s)[0], |
113 |
p=/^http:/.test(d.location)?'http':'https'; |
114 |
if (!d.getElementById(id)) { |
115 |
js=d.createElement(s); |
116 |
js.id=id; |
117 |
js.src=p+'://platform.twitter.com/widgets.js'; |
118 |
fjs.parentNode.insertBefore(js,fjs); |
119 |
} |
120 |
})(document, 'script', 'twitter-wjs');]]> |
121 |
</script> |
122 |
</span> |
123 |
</div> |
124 |
<div class="nav"> |
125 |
<xsl:apply-templates select="$project/body/menu" /> |
126 |
</div> |
127 |
<div class="main"> |
128 |
<xsl:call-template name="pagelinks" /> |
129 |
<xsl:if test="@index"> |
130 |
<xsl:call-template name="section-index" /> |
131 |
</xsl:if> |
132 |
<xsl:apply-templates select="body/section"></xsl:apply-templates> |
133 |
</div> |
134 |
<div class="footer"> |
135 |
<div class="copyright"> |
136 |
Copyright &copy; |
137 |
1999 &ndash; |
138 |
<xsl:value-of select="$year" /> |
139 |
, Apache Software Foundation |
140 |
</div> |
141 |
<div class="trademarks">Apache, Apache JMeter, JMeter, the Apache |
142 |
feather, and the Apache JMeter logo are |
143 |
trademarks of the |
144 |
Apache Software Foundation. |
145 |
</div> |
146 |
</div> |
147 |
</body> |
148 |
</html> |
149 |
</xsl:template> |
150 |
|
151 |
<xsl:template name="pagelinks"> |
152 |
<xsl:if test="@prev or @next"> |
153 |
<ul class="pagelinks"> |
154 |
<xsl:if test="@prev"> |
155 |
<li> |
156 |
<a href="{@prev}">Prev</a> |
157 |
</li> |
158 |
</xsl:if> |
159 |
<li> |
160 |
<a href="{concat($relative-path, '/index.html')}">Index</a> |
161 |
</li> |
162 |
<xsl:if test="@next"> |
163 |
<li> |
164 |
<a href="{@next}">Next</a> |
165 |
</li> |
166 |
</xsl:if> |
167 |
</ul> |
168 |
</xsl:if> |
169 |
</xsl:template> |
170 |
|
171 |
<xsl:template name="section-index"> |
172 |
<ul class="section-index"> |
173 |
<xsl:for-each select="body/section"> |
174 |
<li> |
175 |
<a href="#{@anchor}"> |
176 |
<xsl:value-of select="@name" /> |
177 |
</a> |
178 |
<ul> |
179 |
<xsl:for-each select="component"> |
180 |
<li> |
181 |
<a href="#{translate(normalize-space(@name), ' ', '_')}"> |
182 |
<xsl:value-of select="@name" /> |
183 |
<xsl:if test="@was"> |
184 |
(was: |
185 |
<xsl:value-of select="@was" /> |
186 |
) |
187 |
</xsl:if> |
188 |
</a> |
189 |
</li> |
190 |
</xsl:for-each> |
191 |
</ul> |
192 |
</li> |
193 |
</xsl:for-each> |
194 |
</ul> |
195 |
<xsl:call-template name="pagelinks" /> |
196 |
</xsl:template> |
197 |
|
198 |
<!-- Process a menu for the navigation bar --> |
199 |
<xsl:template match="menu"> |
200 |
<ul class="menu"> |
201 |
<li> |
202 |
<div class="menu-title"> |
203 |
<xsl:value-of select="@name" /> |
204 |
</div> |
205 |
<ul> |
206 |
<xsl:apply-templates select="item" /> |
207 |
</ul> |
208 |
</li> |
209 |
</ul> |
210 |
</xsl:template> |
211 |
|
212 |
<!-- Process a menu item for the navigation bar --> |
213 |
<xsl:template match="item"> |
214 |
<xsl:variable name="href"> |
215 |
<xsl:choose> |
216 |
<xsl:when test="starts-with(@href, 'http')"> |
217 |
<xsl:value-of select="@href" /> |
218 |
</xsl:when> |
219 |
<xsl:when test="starts-with(@href, '/site')"> |
220 |
<xsl:value-of select="concat($jakarta-site, @href)" /> |
221 |
</xsl:when> |
222 |
<xsl:otherwise> |
223 |
<xsl:value-of select="concat($relative-path, @href)" /> |
224 |
</xsl:otherwise> |
225 |
</xsl:choose> |
226 |
</xsl:variable> |
227 |
<li> |
228 |
<a href="{$href}"> |
229 |
<xsl:value-of select="@name" /> |
230 |
</a> |
231 |
</li> |
232 |
</xsl:template> |
233 |
|
234 |
<xsl:template match="section"> |
235 |
<div class="section"> |
236 |
<h1> |
237 |
<xsl:value-of select="@name" /> |
238 |
<xsl:if test="@anchor"> |
239 |
<xsl:call-template name="sectionlink"> |
240 |
<xsl:with-param name="anchor" select="@anchor" /> |
241 |
</xsl:call-template> |
242 |
</xsl:if> |
243 |
</h1> |
244 |
<xsl:apply-templates /> |
245 |
</div> |
246 |
</xsl:template> |
247 |
|
248 |
<xsl:template match="ch_section"> |
249 |
<h2 class="ch_section"> |
250 |
<xsl:apply-templates /> |
251 |
</h2> |
252 |
</xsl:template> |
253 |
|
254 |
<xsl:template match="ch_title"> |
255 |
<h2 class="ch_title"> |
256 |
<xsl:apply-templates /> |
257 |
</h2> |
258 |
</xsl:template> |
259 |
|
260 |
<xsl:template match="ch_category"> |
261 |
<h2 class="ch_category"> |
262 |
<xsl:apply-templates /> |
263 |
</h2> |
264 |
</xsl:template> |
265 |
|
266 |
<xsl:template match="subsection"> |
267 |
<div class="subsection"> |
268 |
<h2> |
269 |
<xsl:value-of select="@name" /> |
270 |
<xsl:if test="@anchor"> |
271 |
<xsl:call-template name="sectionlink"> |
272 |
<xsl:with-param name="anchor" select="@anchor" /> |
273 |
</xsl:call-template> |
274 |
</xsl:if> |
275 |
</h2> |
276 |
<xsl:apply-templates /> |
277 |
</div> |
278 |
</xsl:template> |
279 |
|
280 |
<xsl:template match="source"> |
281 |
<pre class="source"> |
282 |
<xsl:apply-templates /> |
283 |
</pre> |
284 |
</xsl:template> |
285 |
|
286 |
<xsl:template match="code"> |
287 |
<span class="code"> |
288 |
<xsl:apply-templates /> |
289 |
</span> |
290 |
</xsl:template> |
291 |
|
292 |
<xsl:template match="description"> |
293 |
<div class="description"> |
294 |
<xsl:apply-templates /> |
295 |
</div> |
296 |
</xsl:template> |
297 |
|
298 |
<xsl:template match="component"> |
299 |
<div class="component"> |
300 |
<h2> |
301 |
<xsl:value-of select="@name" /> |
302 |
<xsl:if test="@was"> |
303 |
<a name="{@was}"> |
304 |
(was: |
305 |
<xsl:value-of select="@was" /> |
306 |
) |
307 |
</a> |
308 |
</xsl:if> |
309 |
<xsl:if test="@name"> |
310 |
<xsl:call-template name="sectionlink"> |
311 |
<xsl:with-param name="anchor" select="@name" /> |
312 |
</xsl:call-template> |
313 |
</xsl:if> |
314 |
</h2> |
315 |
<xsl:if test="@useinstead"> |
316 |
<div class="deprecated"> |
317 |
*** This element is deprecated. Use |
318 |
<a |
319 |
href="{concat($relative-path, '/usermanual/component_reference.html#', translate(normalize-space(@useinstead), ' ', '_'))}" |
320 |
> |
321 |
<xsl:value-of select="@useinstead" /> |
322 |
</a> |
323 |
instead *** |
324 |
</div> |
325 |
</xsl:if> |
326 |
<xsl:if test="@screenshot"> |
327 |
<div class="screenshot"> |
328 |
<img src="{concat('../images/screenshots/', @screenshot)}" |
329 |
width="{@width}" height="{@height}" /> |
330 |
</div> |
331 |
</xsl:if> |
332 |
<xsl:apply-templates /> |
333 |
<div class="go-top"> |
334 |
<a href="#">^</a> |
335 |
</div> |
336 |
</div> |
337 |
</xsl:template> |
338 |
|
339 |
<xsl:template name="sectionlink"> |
340 |
<xsl:param name="anchor" /> |
341 |
<a name="{translate(normalize-space($anchor), ' ', '_')}" /> |
342 |
<a class="sectionlink" href="#{translate(normalize-space($anchor), ' ', '_')}" |
343 |
title="Link to here" |
344 |
>&para;</a> |
345 |
</xsl:template> |
346 |
|
347 |
<xsl:template match="properties"> |
348 |
<div class="properties"> |
349 |
<h3> |
350 |
Parameters |
351 |
<xsl:if test="name(..) = 'component'"> |
352 |
<xsl:call-template name="sectionlink"> |
353 |
<xsl:with-param name="anchor" |
354 |
select="concat(translate(normalize-space(../@name), ' ', '_'), '_parms')" /> |
355 |
</xsl:call-template> |
356 |
</xsl:if> |
357 |
</h3> |
358 |
<div class="property title"> |
359 |
<div class="name title">Attribute</div> |
360 |
<div class="description title">Description</div> |
361 |
<div class="required title">Required</div> |
362 |
</div> |
363 |
<xsl:apply-templates /> |
364 |
</div> |
365 |
</xsl:template> |
366 |
|
367 |
<xsl:template match="property"> |
368 |
<div class="property"> |
369 |
<div |
370 |
class="name req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
371 |
> |
372 |
<xsl:value-of select="@name" /> |
373 |
</div> |
374 |
<div |
375 |
class="description req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
376 |
> |
377 |
<xsl:apply-templates /> |
378 |
</div> |
379 |
<div |
380 |
class="required req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
381 |
> |
382 |
<xsl:value-of select="@required" /> |
383 |
</div> |
384 |
</div> |
385 |
</xsl:template> |
386 |
|
387 |
<xsl:template match="note"> |
388 |
<div class="clear"></div> |
389 |
<div class="note"> |
390 |
<xsl:apply-templates /> |
391 |
</div> |
392 |
<div class="clear"></div> |
393 |
</xsl:template> |
394 |
|
395 |
<xsl:template name="complink"> |
396 |
<xsl:param name="name" /> |
397 |
<a |
398 |
href="{concat($relative-path, '/usermanual/component_reference.html#', translate(@name, ' ', '_'))}" |
399 |
> |
400 |
<xsl:value-of select="translate(@name, ' ', '_')" /> |
401 |
</a> |
402 |
</xsl:template> |
403 |
|
404 |
<xsl:template match="complink"> |
405 |
<xsl:call-template name="complink"> |
406 |
<xsl:with-param name="name" select="@name" /> |
407 |
</xsl:call-template> |
408 |
</xsl:template> |
409 |
|
410 |
<xsl:template match="figure"> |
411 |
<div class="figure"> |
412 |
<img src="{concat($sshotdir, '/', @image)}" /> |
413 |
<figcaption> |
414 |
<xsl:apply-templates /> |
415 |
</figcaption> |
416 |
</div> |
417 |
</xsl:template> |
418 |
|
419 |
<xsl:template match="bugzilla"> |
420 |
<a href="http://bz.apache.org/bugzilla/show_bug.cgi?id={./text()}"> |
421 |
Bug |
422 |
<xsl:value-of select="./text()" /> |
423 |
</a> |
424 |
</xsl:template> |
425 |
|
426 |
<xsl:template match="bug"> |
427 |
<a href="http://bz.apache.org/bugzilla/show_bug.cgi?id={./text()}"> |
428 |
Bug |
429 |
<xsl:value-of select="./text()" /> |
430 |
</a> |
431 |
- |
432 |
</xsl:template> |
433 |
|
434 |
<xsl:template match="links"> |
435 |
<div class="links"> |
436 |
See also: |
437 |
<ul class="links"> |
438 |
<xsl:apply-templates /> |
439 |
</ul> |
440 |
</div> |
441 |
</xsl:template> |
442 |
|
443 |
<xsl:template match="link"> |
444 |
<li> |
445 |
<a href="{@href}"> |
446 |
<xsl:apply-templates /> |
447 |
</a> |
448 |
</li> |
449 |
</xsl:template> |
450 |
|
451 |
<xsl:template match="example"> |
452 |
<div class="example"> |
453 |
<div class="title"> |
454 |
<xsl:value-of select="@title" /> |
455 |
<xsl:if test="@anchor"> |
456 |
<xsl:call-template name="sectionlink"> |
457 |
<xsl:with-param name="anchor" select="@anchor" /> |
458 |
</xsl:call-template> |
459 |
</xsl:if> |
460 |
</div> |
461 |
<xsl:apply-templates /> |
462 |
</div> |
463 |
</xsl:template> |
464 |
|
465 |
<xsl:template |
466 |
match="h1|h2|h3|h4|h5|p|b|em|ul|ol|li|a|i|pre|br|tt|table|tr|th|td|dl|dt|dd|sup|u|strong|thead|tbody|form|select|option|input|font|center|img|body|style" |
467 |
> |
468 |
<xsl:copy> |
469 |
<xsl:apply-templates select="@*|*|text()" /> |
470 |
</xsl:copy> |
471 |
</xsl:template> |
472 |
|
473 |
|
474 |
<!-- Process everything else by just passing it through --> |
475 |
<xsl:template match="*"> |
476 |
<div class="nostyle"> |
477 |
<xsl:copy> |
478 |
<xsl:apply-templates select="@*|*|text()" /> |
479 |
</xsl:copy> |
480 |
</div> |
481 |
</xsl:template> |
482 |
|
483 |
<xsl:template match="@*"> |
484 |
<xsl:copy> |
485 |
<xsl:apply-templates select="@*|*|text()" /> |
486 |
</xsl:copy> |
487 |
</xsl:template> |
488 |
|
489 |
</xsl:stylesheet> |