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" |
57 |
href="{concat($cssdir, '/new-style.css')}" |
58 |
></link> |
59 |
</head> |
60 |
<body role="document"> |
61 |
<div class="header"> |
62 |
<xsl:comment> |
63 |
APACHE LOGO |
64 |
</xsl:comment> |
65 |
<span> |
66 |
<a href="http://www.apache.org"> |
67 |
<img title="Apache Software Foundation" width="290" |
68 |
height="75" src="{$imgdir}/asf-logo.png" alt="Logo ASF" /> |
69 |
</a> |
70 |
</span> |
71 |
<xsl:if test="$project/logo"> |
72 |
<xsl:variable name="alt"> |
73 |
<xsl:value-of select="$project/logo" /> |
74 |
</xsl:variable> |
75 |
<xsl:variable name="home"> |
76 |
<xsl:value-of select="$project/@href" /> |
77 |
</xsl:variable> |
78 |
<xsl:variable name="src"> |
79 |
<xsl:value-of |
80 |
select="concat($relative-path, $project/logo/@href)" /> |
81 |
</xsl:variable> |
82 |
<xsl:comment> |
83 |
PROJECT LOGO |
84 |
</xsl:comment> |
85 |
<span> |
86 |
<a href="{$home}"> |
87 |
<img src="{$src}" alt="{$alt}" /> |
88 |
</a> |
89 |
</span> |
90 |
</xsl:if> |
91 |
<span> |
92 |
<div> |
93 |
<a href="https://twitter.com/share" class="twitter-share-button" |
94 |
data-text="Powerful Load Testing with Apache #JMeter" |
95 |
data-via="ApacheJMeter" data-lang="en-gb" data-size="large" |
96 |
>Tweet</a> |
97 |
<script><![CDATA[ |
98 |
(function(d,s,id){ |
99 |
var js, |
100 |
fjs=d.getElementsByTagName(s)[0], |
101 |
p=/^http:/.test(d.location)?'http':'https'; |
102 |
if (!d.getElementById(id)) { |
103 |
js=d.createElement(s); |
104 |
js.id=id; |
105 |
js.src=p+'://platform.twitter.com/widgets.js'; |
106 |
fjs.parentNode.insertBefore(js,fjs); |
107 |
} |
108 |
})(document, 'script', 'twitter-wjs');]]> |
109 |
</script> |
110 |
<a href="https://twitter.com/ApacheJMeter" class="twitter-follow-button" |
111 |
data-show-count="false" data-lang="en-gb" data-size="large" |
112 |
>Follow</a> |
113 |
<script><![CDATA[(function(d,s,id){ |
114 |
var js, |
115 |
fjs=d.getElementsByTagName(s)[0], |
116 |
p=/^http:/.test(d.location)?'http':'https'; |
117 |
if (!d.getElementById(id)) { |
118 |
js=d.createElement(s); |
119 |
js.id=id; |
120 |
js.src=p+'://platform.twitter.com/widgets.js'; |
121 |
fjs.parentNode.insertBefore(js,fjs); |
122 |
} |
123 |
})(document, 'script', 'twitter-wjs');]]> |
124 |
</script> |
125 |
</div> |
126 |
</span> |
127 |
</div> |
128 |
<div class="nav"> |
129 |
<xsl:apply-templates select="$project/body/menu" /> |
130 |
<div class="banner"> |
131 |
<iframe src="http://www.apache.org/ads/button.html" |
132 |
style="border-width:0;" frameborder="0" scrolling="no" |
133 |
></iframe> |
134 |
<div class="clear"></div> |
135 |
</div> |
136 |
</div> |
137 |
<div class="main"> |
138 |
<xsl:call-template name="pagelinks" /> |
139 |
<xsl:if test="@index"> |
140 |
<xsl:call-template name="section-index" /> |
141 |
</xsl:if> |
142 |
<xsl:apply-templates select="body/section"></xsl:apply-templates> |
143 |
<xsl:call-template name="pagelinks" /> |
144 |
</div> |
145 |
<div class="footer"> |
146 |
<div class="copyright"> |
147 |
Copyright &copy; |
148 |
1999 &ndash; |
149 |
<xsl:value-of select="$year" /> |
150 |
, Apache Software Foundation |
151 |
</div> |
152 |
<div class="trademarks">Apache, Apache JMeter, JMeter, the Apache |
153 |
feather, and the Apache JMeter logo are |
154 |
trademarks of the |
155 |
Apache Software Foundation. |
156 |
</div> |
157 |
</div> |
158 |
</body> |
159 |
</html> |
160 |
</xsl:template> |
161 |
|
162 |
<xsl:template name="pagelinks"> |
163 |
<xsl:if test="@prev or @next"> |
164 |
<ul class="pagelinks"> |
165 |
<xsl:if test="@prev"> |
166 |
<li> |
167 |
<a href="{@prev}">< Prev</a> |
168 |
</li> |
169 |
</xsl:if> |
170 |
<li> |
171 |
<a href="{concat($relative-path, '/index.html')}">Index</a> |
172 |
</li> |
173 |
<xsl:if test="@next"> |
174 |
<li> |
175 |
<a href="{@next}">Next ></a> |
176 |
</li> |
177 |
</xsl:if> |
178 |
</ul> |
179 |
</xsl:if> |
180 |
</xsl:template> |
181 |
|
182 |
<xsl:template name="section-index"> |
183 |
<ul class="section-index"> |
184 |
<xsl:for-each select="body/section"> |
185 |
<li> |
186 |
<a href="#{@anchor}"> |
187 |
<xsl:value-of select="@name" /> |
188 |
</a> |
189 |
<ul> |
190 |
<xsl:for-each select="component"> |
191 |
<li> |
192 |
<a href="#{translate(normalize-space(@name), ' ', '_')}"> |
193 |
<xsl:value-of select="@name" /> |
194 |
<xsl:if test="@was"> |
195 |
(was: |
196 |
<xsl:value-of select="@was" /> |
197 |
) |
198 |
</xsl:if> |
199 |
</a> |
200 |
</li> |
201 |
</xsl:for-each> |
202 |
</ul> |
203 |
</li> |
204 |
</xsl:for-each> |
205 |
</ul> |
206 |
</xsl:template> |
207 |
|
208 |
<!-- Process a menu for the navigation bar --> |
209 |
<xsl:template match="menu"> |
210 |
<ul class="menu"> |
211 |
<li> |
212 |
<div class="menu-title"> |
213 |
<xsl:value-of select="@name" /> |
214 |
</div> |
215 |
<ul> |
216 |
<xsl:apply-templates select="item" /> |
217 |
</ul> |
218 |
</li> |
219 |
</ul> |
220 |
</xsl:template> |
221 |
|
222 |
<!-- Process a menu item for the navigation bar --> |
223 |
<xsl:template match="item"> |
224 |
<xsl:variable name="href"> |
225 |
<xsl:choose> |
226 |
<xsl:when test="starts-with(@href, 'http')"> |
227 |
<xsl:value-of select="@href" /> |
228 |
</xsl:when> |
229 |
<xsl:when test="starts-with(@href, '/site')"> |
230 |
<xsl:value-of select="concat($jakarta-site, @href)" /> |
231 |
</xsl:when> |
232 |
<xsl:otherwise> |
233 |
<xsl:value-of select="concat($relative-path, @href)" /> |
234 |
</xsl:otherwise> |
235 |
</xsl:choose> |
236 |
</xsl:variable> |
237 |
<li> |
238 |
<a href="{$href}"> |
239 |
<xsl:value-of select="@name" /> |
240 |
<xsl:if test="@icon"> |
241 |
<img src="{concat($imgdir, '/', @icon)}" /> |
242 |
</xsl:if> |
243 |
</a> |
244 |
</li> |
245 |
</xsl:template> |
246 |
|
247 |
<xsl:template match="section"> |
248 |
<div class="section"> |
249 |
<h1> |
250 |
<xsl:value-of select="@name" /> |
251 |
<xsl:if test="@anchor"> |
252 |
<xsl:call-template name="sectionlink"> |
253 |
<xsl:with-param name="anchor" select="@anchor" /> |
254 |
</xsl:call-template> |
255 |
</xsl:if> |
256 |
</h1> |
257 |
<xsl:apply-templates /> |
258 |
</div> |
259 |
</xsl:template> |
260 |
|
261 |
<xsl:template match="ch_section"> |
262 |
<h2 class="ch_section"> |
263 |
<xsl:apply-templates /> |
264 |
</h2> |
265 |
</xsl:template> |
266 |
|
267 |
<xsl:template match="ch_title"> |
268 |
<h2 class="ch_title"> |
269 |
<xsl:apply-templates /> |
270 |
</h2> |
271 |
</xsl:template> |
272 |
|
273 |
<xsl:template match="ch_category"> |
274 |
<h2 class="ch_category"> |
275 |
<xsl:apply-templates /> |
276 |
</h2> |
277 |
</xsl:template> |
278 |
|
279 |
<xsl:template match="subsection"> |
280 |
<div class="subsection"> |
281 |
<h2> |
282 |
<xsl:value-of select="@name" /> |
283 |
<xsl:if test="@anchor"> |
284 |
<xsl:call-template name="sectionlink"> |
285 |
<xsl:with-param name="anchor" select="@anchor" /> |
286 |
</xsl:call-template> |
287 |
</xsl:if> |
288 |
</h2> |
289 |
<xsl:apply-templates /> |
290 |
</div> |
291 |
</xsl:template> |
292 |
|
293 |
<xsl:template match="source"> |
294 |
<pre class="source"> |
295 |
<xsl:apply-templates /> |
296 |
</pre> |
297 |
</xsl:template> |
298 |
|
299 |
<xsl:template match="code"> |
300 |
<span class="code"> |
301 |
<xsl:apply-templates /> |
302 |
</span> |
303 |
</xsl:template> |
304 |
|
305 |
<xsl:template match="description"> |
306 |
<div class="description"> |
307 |
<xsl:apply-templates /> |
308 |
</div> |
309 |
</xsl:template> |
310 |
|
311 |
<xsl:template match="component"> |
312 |
<div class="component"> |
313 |
<h2> |
314 |
<xsl:value-of select="@name" /> |
315 |
<xsl:if test="@was"> |
316 |
<a name="{@was}"> |
317 |
(was: |
318 |
<xsl:value-of select="@was" /> |
319 |
) |
320 |
</a> |
321 |
</xsl:if> |
322 |
<xsl:if test="@name"> |
323 |
<xsl:call-template name="sectionlink"> |
324 |
<xsl:with-param name="anchor" select="@name" /> |
325 |
</xsl:call-template> |
326 |
</xsl:if> |
327 |
</h2> |
328 |
<xsl:if test="@useinstead"> |
329 |
<div class="deprecated"> |
330 |
*** This element is deprecated. Use |
331 |
<a |
332 |
href="{concat($relative-path, '/usermanual/component_reference.html#', translate(normalize-space(@useinstead), ' ', '_'))}" |
333 |
> |
334 |
<xsl:value-of select="@useinstead" /> |
335 |
</a> |
336 |
instead *** |
337 |
</div> |
338 |
</xsl:if> |
339 |
<xsl:if test="@screenshot"> |
340 |
<div class="screenshot"> |
341 |
<img src="{concat('../images/screenshots/', @screenshot)}" |
342 |
width="{@width}" height="{@height}" /> |
343 |
</div> |
344 |
</xsl:if> |
345 |
<xsl:apply-templates /> |
346 |
<div class="go-top"> |
347 |
<a href="#">^</a> |
348 |
</div> |
349 |
</div> |
350 |
</xsl:template> |
351 |
|
352 |
<xsl:template name="sectionlink"> |
353 |
<xsl:param name="anchor" /> |
354 |
<a name="{translate(normalize-space($anchor), ' ', '_')}" /> |
355 |
<a class="sectionlink" href="#{translate(normalize-space($anchor), ' ', '_')}" |
356 |
title="Link to here" |
357 |
>&para;</a> |
358 |
</xsl:template> |
359 |
|
360 |
<xsl:template match="properties"> |
361 |
<div class="properties"> |
362 |
<h3> |
363 |
Parameters |
364 |
<xsl:if test="name(..) = 'component'"> |
365 |
<xsl:call-template name="sectionlink"> |
366 |
<xsl:with-param name="anchor" |
367 |
select="concat(translate(normalize-space(../@name), ' ', '_'), '_parms')" /> |
368 |
</xsl:call-template> |
369 |
</xsl:if> |
370 |
</h3> |
371 |
<div class="property title"> |
372 |
<div class="name title">Attribute</div> |
373 |
<div class="description title">Description</div> |
374 |
<div class="required title">Required</div> |
375 |
</div> |
376 |
<xsl:apply-templates /> |
377 |
</div> |
378 |
</xsl:template> |
379 |
|
380 |
<xsl:template match="property"> |
381 |
<div class="property"> |
382 |
<div |
383 |
class="name req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
384 |
> |
385 |
<xsl:value-of select="@name" /> |
386 |
</div> |
387 |
<div |
388 |
class="description req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
389 |
> |
390 |
<xsl:apply-templates /> |
391 |
</div> |
392 |
<div |
393 |
class="required req-{contains('yYtT', substring(normalize-space(@required), 1, 1))}" |
394 |
> |
395 |
<xsl:choose> |
396 |
<xsl:when test="@required"> |
397 |
<xsl:value-of select="@required" /> |
398 |
</xsl:when> |
399 |
<xsl:otherwise> |
400 |
No |
401 |
</xsl:otherwise> |
402 |
</xsl:choose> |
403 |
</div> |
404 |
</div> |
405 |
</xsl:template> |
406 |
|
407 |
<xsl:template match="note"> |
408 |
<div class="clear"></div> |
409 |
<div class="note"> |
410 |
<xsl:apply-templates /> |
411 |
</div> |
412 |
<div class="clear"></div> |
413 |
</xsl:template> |
414 |
|
415 |
<xsl:template name="complink"> |
416 |
<xsl:param name="name" /> |
417 |
<a |
418 |
href="{concat($relative-path, '/usermanual/component_reference.html#', translate(@name, ' ', '_'))}" |
419 |
> |
420 |
<xsl:value-of select="@name" /> |
421 |
</a> |
422 |
</xsl:template> |
423 |
|
424 |
<xsl:template match="complink"> |
425 |
<xsl:call-template name="complink"> |
426 |
<xsl:with-param name="name" select="@name" /> |
427 |
</xsl:call-template> |
428 |
</xsl:template> |
429 |
|
430 |
<xsl:template match="figure"> |
431 |
<div class="figure"> |
432 |
<img src="{concat($sshotdir, '/', @image)}" /> |
433 |
<figcaption> |
434 |
<xsl:apply-templates /> |
435 |
</figcaption> |
436 |
</div> |
437 |
</xsl:template> |
438 |
|
439 |
<xsl:template match="bugzilla"> |
440 |
<a href="http://bz.apache.org/bugzilla/show_bug.cgi?id={./text()}"> |
441 |
Bug |
442 |
<xsl:value-of select="./text()" /> |
443 |
</a> |
444 |
</xsl:template> |
445 |
|
446 |
<xsl:template match="bug"> |
447 |
<a href="http://bz.apache.org/bugzilla/show_bug.cgi?id={./text()}"> |
448 |
Bug |
449 |
<xsl:value-of select="./text()" /> |
450 |
</a> |
451 |
- |
452 |
</xsl:template> |
453 |
|
454 |
<xsl:template match="links"> |
455 |
<div class="links"> |
456 |
See also: |
457 |
<ul class="links"> |
458 |
<xsl:for-each select="link|complink"> |
459 |
<li> |
460 |
<xsl:choose> |
461 |
<xsl:when test="name(.) = 'link'"> |
462 |
<a href="{@href}"> |
463 |
<xsl:apply-templates /> |
464 |
</a> |
465 |
</xsl:when> |
466 |
<xsl:when test="name(.) = 'complink'"> |
467 |
<xsl:call-template name="complink"> |
468 |
<xsl:with-param name="name" select="@name" /> |
469 |
</xsl:call-template> |
470 |
</xsl:when> |
471 |
</xsl:choose> |
472 |
</li> |
473 |
</xsl:for-each> |
474 |
</ul> |
475 |
</div> |
476 |
</xsl:template> |
477 |
|
478 |
<xsl:template match="link"> |
479 |
<li> |
480 |
<a href="{@href}"> |
481 |
<xsl:apply-templates /> |
482 |
</a> |
483 |
</li> |
484 |
</xsl:template> |
485 |
|
486 |
<xsl:template match="example"> |
487 |
<div class="example"> |
488 |
<div class="title"> |
489 |
<xsl:value-of select="@title" /> |
490 |
<xsl:if test="@anchor"> |
491 |
<xsl:call-template name="sectionlink"> |
492 |
<xsl:with-param name="anchor" select="@anchor" /> |
493 |
</xsl:call-template> |
494 |
</xsl:if> |
495 |
</div> |
496 |
<xsl:apply-templates /> |
497 |
</div> |
498 |
</xsl:template> |
499 |
|
500 |
<xsl:template match="table"> |
501 |
<table> |
502 |
<xsl:apply-templates /> |
503 |
</table> |
504 |
</xsl:template> |
505 |
|
506 |
<xsl:template |
507 |
match="h1|h2|h3|h4|h5|p|b|em|ul|ol|li|a|i|pre|br|tt|tr|th|td|dl|dt|dd|sup|u|strong|thead|tbody|form|select|option|input|font|center|img|body|style|div|hr" |
508 |
> |
509 |
<xsl:copy> |
510 |
<xsl:apply-templates select="@*|*|text()" /> |
511 |
</xsl:copy> |
512 |
</xsl:template> |
513 |
|
514 |
|
515 |
<!-- Process everything else by just passing it through --> |
516 |
<xsl:template match="*"> |
517 |
<div class="nostyle"> |
518 |
<xsl:copy> |
519 |
<xsl:apply-templates select="@*|*|text()" /> |
520 |
</xsl:copy> |
521 |
</div> |
522 |
</xsl:template> |
523 |
|
524 |
<xsl:template match="@*"> |
525 |
<xsl:copy> |
526 |
<xsl:apply-templates select="@*|*|text()" /> |
527 |
</xsl:copy> |
528 |
</xsl:template> |
529 |
|
530 |
</xsl:stylesheet> |