Lines 1-4
Link Here
|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
2 |
<!-- |
3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
3 |
Licensed to the Apache Software Foundation (ASF) under one or more |
4 |
contributor license agreements. See the NOTICE file distributed with |
4 |
contributor license agreements. See the NOTICE file distributed with |
Lines 20-66
Link Here
|
20 |
<!-- $Id$ --> |
20 |
<!-- $Id$ --> |
21 |
|
21 |
|
22 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
22 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
23 |
version="1.0"> |
23 |
version="3.0"> |
24 |
|
24 |
|
25 |
|
25 |
|
26 |
<!-- Output method --> |
26 |
<!-- Output method --> |
27 |
<xsl:output method="html" |
27 |
<xsl:output method="html" |
28 |
encoding="iso-8859-1" |
28 |
html-version="5.0" |
29 |
indent="no"/> |
29 |
encoding="UTF-8" |
|
|
30 |
indent="no" |
31 |
doctype-system="about:legacy-compat"/> |
30 |
|
32 |
|
31 |
|
33 |
|
32 |
<!-- Defined parameters (overrideable) --> |
34 |
<!-- Defined parameters (overrideable) --> |
33 |
<xsl:param name="home-name" select="'The Tomcat Project'"/> |
35 |
<xsl:param name="home-name" select="'The Tomcat Project'"/> |
34 |
<xsl:param name="home-href" select="'http://tomcat.apache.org/'"/> |
36 |
<xsl:param name="home-href" select="'http://tomcat.apache.org/'"/> |
35 |
<xsl:param name="home-logo" select="'/images/tomcat.gif'"/> |
37 |
<xsl:param name="home-logo" select="'/images/tomcat-new.png'"/> |
36 |
<xsl:param name="printer-logo" select="'/images/printer.gif'"/> |
38 |
<xsl:param name="home-stylesheet" select="'/images/docs-stylesheet.css'"/> |
37 |
<xsl:param name="apache-logo" select="'/images/asf-logo.gif'"/> |
39 |
<xsl:param name="printer-logo" select="'/images/printer.gif'"/> |
38 |
<xsl:param name="subdir" select="''"/> |
40 |
<xsl:param name="apache-logo" select="'/images/asf-logo.gif'"/> |
39 |
<xsl:param name="relative-path" select="'.'"/> |
41 |
<xsl:param name="subdir" select="''"/> |
40 |
<xsl:param name="version" select="'8.0.x'"/> |
42 |
<xsl:param name="relative-path" select="'.'"/> |
41 |
<xsl:param name="majorversion" select="'8.0'"/> |
43 |
<xsl:param name="version" select="'8.0.x'"/> |
42 |
<xsl:param name="build-date" select="'MMM d yyyy'"/> |
44 |
<xsl:param name="majorversion" select="'8.0'"/> |
43 |
<xsl:param name="year" select="'yyyy'"/> |
45 |
<xsl:param name="build-date" select="'MMM d yyyy'"/> |
44 |
<xsl:param name="void-image" select="'/images/void.gif'"/> |
46 |
<xsl:param name="build-date-iso-8601" select="'yyyy-dd-MM'"/> |
45 |
<xsl:param name="project-menu" select="'menu'"/> |
47 |
<xsl:param name="year" select="'yyyy'"/> |
46 |
<xsl:param name="standalone" select="''"/> |
48 |
<xsl:param name="void-image" select="'/images/void.gif'"/> |
47 |
<xsl:param name="buglink" select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/> |
49 |
<xsl:param name="project-menu" select="'menu'"/> |
48 |
<xsl:param name="revlink" select="'http://svn.apache.org/viewvc?view=rev&rev='"/> |
50 |
<xsl:param name="standalone" select="''"/> |
49 |
<xsl:param name="sitedir" select="''"/> |
51 |
<xsl:param name="buglink" select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/> |
50 |
<xsl:param name="filename" select="'-'"/> |
52 |
<xsl:param name="revlink" select="'http://svn.apache.org/viewvc?view=rev&rev='"/> |
|
|
53 |
<xsl:param name="sitedir" select="''"/> |
54 |
<xsl:param name="filename" select="'-'"/> |
51 |
|
55 |
|
52 |
<!-- Defined variables (non-overrideable) --> |
56 |
<!-- Defined variables (non-overrideable) --> |
53 |
<xsl:variable name="body-bg" select="'#ffffff'"/> |
|
|
54 |
<xsl:variable name="body-fg" select="'#000000'"/> |
55 |
<xsl:variable name="body-link" select="'#525D76'"/> |
56 |
<xsl:variable name="banner-bg" select="'#525D76'"/> |
57 |
<xsl:variable name="banner-fg" select="'#ffffff'"/> |
58 |
<xsl:variable name="sub-banner-bg" select="'#828DA6'"/> |
59 |
<xsl:variable name="sub-banner-fg" select="'#ffffff'"/> |
60 |
<xsl:variable name="source-color" select="'#023264'"/> |
61 |
<xsl:variable name="attributes-color" select="'#023264'"/> |
62 |
<xsl:variable name="table-th-bg" select="'#039acc'"/> |
63 |
<xsl:variable name="table-td-bg" select="'#a0ddf0'"/> |
64 |
<xsl:variable name="commentslink">/<xsl:value-of select="$sitedir"/>comments.html</xsl:variable> |
57 |
<xsl:variable name="commentslink">/<xsl:value-of select="$sitedir"/>comments.html</xsl:variable> |
65 |
|
58 |
|
66 |
<!-- Process an entire document into an HTML page --> |
59 |
<!-- Process an entire document into an HTML page --> |
Lines 67-256
Link Here
|
67 |
<xsl:template match="document"> |
60 |
<xsl:template match="document"> |
68 |
<xsl:variable name="project" |
61 |
<xsl:variable name="project" |
69 |
select="document('project.xml')/project"/> |
62 |
select="document('project.xml')/project"/> |
70 |
<html> |
63 |
<html lang="en"> |
71 |
<head> |
64 |
<head> |
72 |
<title><xsl:value-of select="project/title"/> (<xsl:value-of select="$version"/>) - <xsl:value-of select="properties/title"/></title> |
65 |
<!-- Note: XLST seems to always output a |
73 |
<xsl:for-each select="properties/author"> |
66 |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
74 |
<xsl:variable name="name"> |
67 |
when method="html", |
75 |
<xsl:value-of select="."/> |
68 |
therefore we can't use |
76 |
</xsl:variable> |
69 |
<meta charset="UTF-8"/>. |
77 |
<!-- |
70 |
|
|
|
71 |
In XHTML, this is not needed as the encoding will be |
72 |
specified in the XML declaration. |
73 |
--> |
74 |
|
75 |
<xsl:variable name="css-src"> |
76 |
<xsl:value-of select="$relative-path"/><xsl:value-of select="$home-stylesheet"/> |
77 |
</xsl:variable> |
78 |
<link href="{$css-src}" rel="stylesheet" type="text/css"/> |
79 |
<style type="text/css" media="print"><![CDATA[ |
80 |
.noPrint { display: none; } |
81 |
#middle > div > div#mainLeft { display: none; } |
82 |
a { color: inherit; text-decoration: none; } |
83 |
]]></style> |
84 |
|
85 |
<title><xsl:value-of select="project/title"/> (<xsl:value-of select="$version"/>) - <xsl:value-of select="properties/title"/></title> |
86 |
<xsl:for-each select="properties/author"> |
87 |
<xsl:variable name="name"> |
88 |
<xsl:value-of select="."/> |
89 |
</xsl:variable> |
90 |
<!-- |
78 |
<xsl:variable name="email"> |
91 |
<xsl:variable name="email"> |
79 |
<xsl:value-of select="@email"/> |
92 |
<xsl:value-of select="@email"/> |
80 |
</xsl:variable> |
93 |
</xsl:variable> |
81 |
--> |
94 |
--> |
82 |
<meta name="author" content="{$name}"/> |
95 |
<meta name="author" content="{$name}"/> |
83 |
<!-- Don't publish e-mail addresses |
96 |
<!-- Don't publish e-mail addresses |
84 |
<meta name="email" content="{$email}"/> |
97 |
<meta name="email" content="{$email}"/> |
85 |
--> |
98 |
--> |
86 |
</xsl:for-each> |
99 |
</xsl:for-each> |
87 |
<style type="text/css" media="print"> |
|
|
88 |
.noPrint {display: none;} |
89 |
td#mainBody {width: 100%;} |
90 |
</style> |
91 |
<style type="text/css"> |
92 |
code {background-color:rgb(224,255,255);padding:0 0.1em;} |
93 |
code.attributeName, code.propertyName {background-color:transparent;} |
94 |
</style> |
95 |
<style type="text/css"> |
96 |
.wrapped-source code { display: block; background-color: transparent; } |
97 |
.wrapped-source div { margin: 0 0 0 1.25em; } |
98 |
.wrapped-source p { margin: 0 0 0 1.25em; text-indent: -1.25em; } |
99 |
</style> |
100 |
<style type="text/css"> |
101 |
p.notice { |
102 |
border: 1px solid rgb(255, 0, 0); |
103 |
background-color: rgb(238, 238, 238); |
104 |
color: rgb(0, 51, 102); |
105 |
padding: 0.5em; |
106 |
margin: 1em 2em 1em 1em; |
107 |
} |
108 |
</style> |
109 |
</head> |
110 |
|
100 |
|
111 |
<body bgcolor="{$body-bg}" text="{$body-fg}" link="{$body-link}" |
101 |
<!-- Script for ASF Comments System. --> |
112 |
alink="{$body-link}" vlink="{$body-link}"> |
102 |
<!-- |
|
|
103 |
Use data-* attributes for retrieval of XSLT-generated data |
104 |
in JavaScript. |
105 |
Use this approach rather than directly inserting text |
106 |
in a JS string literal as that would cause |
107 |
problems when the string contains special characters |
108 |
like ", ', \n etc. |
109 |
--> |
110 |
<script type="application/javascript" |
111 |
data-sitedir="{$sitedir}" data-subdir="{$subdir}" |
112 |
data-filename="{substring($filename,1,string-length($filename)-4)}"><![CDATA[ |
113 |
(function() { |
114 |
var thisScript = document.currentScript; |
115 |
if (!thisScript) { // Workaround for IE <= 11 |
116 |
var scripts = document.getElementsByTagName("script"); |
117 |
thisScript = scripts[scripts.length - 1]; |
118 |
} |
119 |
document.addEventListener("DOMContentLoaded", (function() { |
120 |
var commentsDiv = document.getElementById("comments_thread"); |
121 |
var commentsShortname = "tomcat"; |
122 |
var commentsIdentifier = "http://tomcat.apache.org/" + |
123 |
thisScript.getAttribute("data-sitedir") + |
124 |
thisScript.getAttribute("data-subdir") + |
125 |
thisScript.getAttribute("data-filename") + ".html"; |
113 |
|
126 |
|
114 |
<table border="0" width="100%" cellspacing="0"> |
127 |
(function(w, d) { |
|
|
128 |
if (w.location.hostname.toLowerCase() == "tomcat.apache.org") { |
129 |
commentsDiv.appendChild(d.createTextNode("Loading comments…")); |
130 |
var s = d.createElement("script"); |
131 |
s.type = "application/javascript"; |
132 |
s.async = true; |
133 |
s.src = "https://comments.apache.org/show_comments.lua?site=" + |
134 |
encodeURIComponent(commentsShortname) + |
135 |
"&page=" + encodeURIComponent(commentsIdentifier); |
136 |
d.head.appendChild(s); |
137 |
} else { |
138 |
commentsDiv.appendChild(d.createTextNode("Comments are disabled for this page at the moment.")); |
139 |
} |
140 |
})(window, document); |
141 |
}), false); |
142 |
})(); |
143 |
]]></script> |
144 |
</head> |
115 |
|
145 |
|
116 |
<xsl:comment>PAGE HEADER</xsl:comment> |
146 |
<body> |
117 |
<tr> |
147 |
<div id="wrapper"> |
118 |
<td> |
148 |
<!-- Header --> |
|
|
149 |
<header id="header"> |
150 |
<div> |
151 |
<div> |
119 |
<xsl:if test="project/logo"> |
152 |
<xsl:if test="project/logo"> |
120 |
<xsl:variable name="alt"> |
|
|
121 |
<xsl:value-of select="project/logo"/> |
122 |
</xsl:variable> |
123 |
<xsl:variable name="home"> |
124 |
<xsl:value-of select="project/@href"/> |
125 |
</xsl:variable> |
126 |
<xsl:variable name="src"> |
153 |
<xsl:variable name="src"> |
127 |
<xsl:value-of select="$relative-path"/><xsl:value-of select="project/logo/@href"/> |
154 |
<xsl:value-of select="$relative-path"/><xsl:value-of select="$home-logo"/> |
128 |
</xsl:variable> |
155 |
</xsl:variable> |
129 |
|
156 |
<div class="logo noPrint"> |
130 |
<xsl:comment>PROJECT LOGO</xsl:comment> |
157 |
<a href="{project/@href}"><img alt="Tomcat Home" src="{$src}"/></a> |
131 |
<a href="{$home}"> |
158 |
</div> |
132 |
<img src="{$src}" align="right" alt="{$alt}" border="0"/> |
|
|
133 |
</a> |
134 |
</xsl:if> |
159 |
</xsl:if> |
135 |
</td> |
|
|
136 |
<td> |
137 |
<h1><font face="arial,helvetica,sanserif"><xsl:value-of select="$project/title"/></font></h1> |
138 |
<font face="arial,helvetica,sanserif">Version <xsl:value-of select="$version"/>, <xsl:value-of select="$build-date"/></font> |
139 |
</td> |
140 |
<td> |
141 |
<xsl:comment>APACHE LOGO</xsl:comment> |
142 |
<xsl:variable name="src"> |
143 |
<xsl:value-of select="$relative-path"/><xsl:value-of select="$apache-logo"/> |
144 |
</xsl:variable> |
145 |
<a href="http://www.apache.org/"> |
146 |
<img src="{$src}" align="right" alt="Apache Logo" border="0"/> |
147 |
</a> |
148 |
</td> |
149 |
</tr> |
150 |
</table> |
151 |
|
160 |
|
152 |
<table border="0" width="100%" cellspacing="4"> |
161 |
<div style="height: 1px;"/> |
|
|
162 |
<div class="asfLogo"><a href="http://www.apache.org/" target="_blank"><img src="http://www.apache.org/images/feather.png" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"/></a></div> |
163 |
<h1><xsl:value-of select="$project/title"/></h1> |
164 |
<div class="versionInfo"> |
165 |
Version <xsl:value-of select="$version"/>, |
166 |
<time datetime="{$build-date-iso-8601}"><xsl:value-of select="$build-date"/></time> |
167 |
</div> |
168 |
<div style="height: 1px;"/> |
169 |
<div style="clear: left;"/> |
170 |
</div> |
171 |
</div> |
172 |
</header> |
153 |
|
173 |
|
154 |
<xsl:comment>HEADER SEPARATOR</xsl:comment> |
174 |
<div id="middle"> |
155 |
<tr> |
175 |
<div> |
156 |
<td colspan="2"> |
176 |
<div id="mainLeft" class="noprint"> |
157 |
<hr noshade="noshade" size="1"/> |
177 |
<div> |
158 |
</td> |
178 |
<!-- Navigation --> |
159 |
</tr> |
179 |
<nav> |
|
|
180 |
<xsl:apply-templates select="project/body/menu"/> |
181 |
</nav> |
182 |
</div> |
183 |
</div> |
184 |
<div id="mainRight"> |
185 |
<div id="content"> |
186 |
<!-- Main Part --> |
187 |
<main> |
188 |
<h2><xsl:value-of select="properties/title"/></h2> |
189 |
<xsl:apply-templates select="body/section"/> |
160 |
|
190 |
|
161 |
<tr> |
191 |
<!-- Comments Section --> |
|
|
192 |
<xsl:if test="not(properties/no-comments)"> |
193 |
<div class="noprint"> |
194 |
<h3> |
195 |
<a id="comments_section">Comments</a> |
196 |
</h3> |
162 |
|
197 |
|
163 |
<xsl:comment>LEFT SIDE NAVIGATION</xsl:comment> |
198 |
<div class="text"> |
164 |
<td width="20%" valign="top" nowrap="nowrap" class="noPrint"> |
199 |
<p class="notice"> |
165 |
<xsl:apply-templates select="project/body/menu"/> |
200 |
<strong>Notice: </strong>This comments section collects your suggestions |
166 |
</td> |
201 |
on improving documentation for Apache Tomcat.<br/><br/> |
|
|
202 |
If you have trouble and need help, read |
203 |
<a href="http://tomcat.apache.org/findhelp.html">Find Help</a> page |
204 |
and ask your question on the tomcat-users |
205 |
<a href="http://tomcat.apache.org/lists.html">mailing list</a>. |
206 |
Do not ask such questions here. This is not a Q&A section.<br/><br/> |
207 |
The Apache Comments System is explained <a href="{$commentslink}">here</a>. |
208 |
Comments may be removed by our moderators if they are either |
209 |
implemented or considered invalid/off-topic. |
210 |
</p> |
211 |
<div id="comments_thread"/> |
212 |
</div> |
213 |
</div> |
214 |
</xsl:if> |
167 |
|
215 |
|
168 |
<xsl:comment>RIGHT SIDE MAIN BODY</xsl:comment> |
216 |
</main> |
169 |
<td width="80%" valign="top" align="left" id="mainBody"> |
217 |
</div> |
170 |
<h1><xsl:value-of select="properties/title"/></h1> |
218 |
</div> |
171 |
<xsl:apply-templates select="body/section"/> |
219 |
</div> |
172 |
</td> |
220 |
</div> |
|
|
221 |
|
222 |
<!-- Footer --> |
223 |
<footer id="footer"> |
224 |
Copyright © 1999-<xsl:value-of select="$year"/>, The Apache Software Foundation |
225 |
</footer> |
226 |
</div> |
227 |
</body> |
228 |
</html> |
173 |
|
229 |
|
174 |
</tr> |
|
|
175 |
|
230 |
|
176 |
<xsl:if test="not(properties/no-comments)"> |
|
|
177 |
<tr class="noPrint"> |
178 |
|
231 |
|
179 |
<td width="20%" valign="top" nowrap="nowrap" class="noPrint"> |
|
|
180 |
</td> |
181 |
<td width="80%" valign="top" align="left"> |
182 |
<table border="0" cellspacing="0" cellpadding="2"> |
183 |
<!-- Comment heading --> |
184 |
<tr><td bgcolor="{$banner-bg}"> |
185 |
<font color="{$banner-fg}" face="arial,helvetica.sanserif"> |
186 |
<a name="comments_section" id="comments_section"><strong>Comments</strong></a></font> |
187 |
</td> |
188 |
</tr> |
189 |
<!-- Comment body --> |
190 |
<tr><td> |
191 |
<blockquote> |
192 |
<p class="notice"> |
193 |
<strong>Notice: </strong>This comments section collects your suggestions |
194 |
on improving documentation for Apache Tomcat.<br/><br/> |
195 |
If you have trouble and need help, read |
196 |
<a href="http://tomcat.apache.org/findhelp.html">Find Help</a> page |
197 |
and ask your question on the tomcat-users |
198 |
<a href="http://tomcat.apache.org/lists.html">mailing list</a>. |
199 |
Do not ask such questions here. This is not a Q&A section.<br/><br/> |
200 |
The Apache Comments System is explained <a href="{$commentslink}">here</a>. |
201 |
Comments may be removed by our moderators if they are either |
202 |
implemented or considered invalid/off-topic.</p> |
203 |
<script type="text/javascript"> |
204 |
<xsl:text disable-output-escaping="yes"><![CDATA[<!--//--><![CDATA[//><!-- |
205 |
var comments_shortname = 'tomcat'; |
206 |
var comments_identifier = 'http://tomcat.apache.org/]]></xsl:text><xsl:value-of select="$sitedir"/><xsl:value-of select="$subdir"/><xsl:value-of select="substring($filename,1,string-length($filename)-4)"/><xsl:text disable-output-escaping="yes"><![CDATA[.html'; |
207 |
(function(w, d) { |
208 |
if (w.location.hostname.toLowerCase() == "tomcat.apache.org") { |
209 |
d.write('<div id="comments_thread"><\/div>'); |
210 |
var s = d.createElement('script'); |
211 |
s.type = 'text/javascript'; |
212 |
s.async = true; |
213 |
s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; |
214 |
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); |
215 |
} |
216 |
else { |
217 |
d.write('<div id="comments_thread"><strong>Comments are disabled for this page at the moment.<\/strong><\/div>'); |
218 |
} |
219 |
})(window, document); |
220 |
//--><!]]]]>></xsl:text></script> |
221 |
</blockquote></td></tr> |
222 |
</table> |
223 |
</td> |
224 |
</tr> |
225 |
</xsl:if> |
226 |
|
227 |
<xsl:comment>FOOTER SEPARATOR</xsl:comment> |
228 |
<tr> |
229 |
<td colspan="2"> |
230 |
<hr noshade="noshade" size="1"/> |
231 |
</td> |
232 |
</tr> |
233 |
|
234 |
<xsl:comment>PAGE FOOTER</xsl:comment> |
235 |
<tr><td colspan="2"> |
236 |
<div align="center"><font color="{$body-link}" size="-1"><em> |
237 |
Copyright © 1999-<xsl:value-of select="$year"/>, Apache Software Foundation |
238 |
</em></font></div> |
239 |
</td></tr> |
240 |
|
241 |
</table> |
242 |
</body> |
243 |
</html> |
244 |
|
245 |
</xsl:template> |
232 |
</xsl:template> |
246 |
|
233 |
|
247 |
|
234 |
|
248 |
<!-- Process a menu for the navigation bar --> |
235 |
<!-- Process a menu for the navigation bar --> |
249 |
<xsl:template match="menu"> |
236 |
<xsl:template match="menu"> |
250 |
<p><strong><xsl:value-of select="@name"/></strong></p> |
237 |
<div> |
|
|
238 |
<h2><strong><xsl:value-of select="@name"/></strong></h2> |
251 |
<ul> |
239 |
<ul> |
252 |
<xsl:apply-templates select="item"/> |
240 |
<xsl:apply-templates select="item"/> |
253 |
</ul> |
241 |
</ul> |
|
|
242 |
</div> |
254 |
</xsl:template> |
243 |
</xsl:template> |
255 |
|
244 |
|
256 |
|
245 |
|
Lines 265-271
Link Here
|
265 |
|
254 |
|
266 |
<!-- Process a documentation section --> |
255 |
<!-- Process a documentation section --> |
267 |
<xsl:template match="section"> |
256 |
<xsl:template match="section"> |
268 |
<xsl:variable name="name"> |
257 |
<xsl:variable name="name2"> |
269 |
<xsl:choose> |
258 |
<xsl:choose> |
270 |
<xsl:when test="@anchor"> |
259 |
<xsl:when test="@anchor"> |
271 |
<xsl:value-of select="@anchor" /> |
260 |
<xsl:value-of select="@anchor" /> |
Lines 275-314
Link Here
|
275 |
</xsl:otherwise> |
264 |
</xsl:otherwise> |
276 |
</xsl:choose> |
265 |
</xsl:choose> |
277 |
</xsl:variable> |
266 |
</xsl:variable> |
278 |
<xsl:variable name="name2"> |
267 |
<xsl:variable name="name"> |
279 |
<xsl:value-of select="translate($name, ' #', '__')"/> |
268 |
<xsl:value-of select="translate($name2, ' #', '__')"/> |
280 |
</xsl:variable> |
269 |
</xsl:variable> |
281 |
<table border="0" cellspacing="0" cellpadding="2"> |
270 |
|
282 |
<!-- Section heading --> |
271 |
|
283 |
<tr><td bgcolor="{$banner-bg}"> |
272 |
<!-- Section heading --> |
284 |
<font color="{$banner-fg}" face="arial,helvetica.sanserif"> |
273 |
<h3> |
285 |
<xsl:if test="$name != $name2"><a name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if> |
274 |
<xsl:if test="@rtext"> |
286 |
<a name="{$name2}"> |
275 |
<!-- Additional right-aligned text cell in section heading. It is used by changelog.xml --> |
287 |
<strong><xsl:value-of select="@name"/></strong></a></font> |
276 |
<span style="float: right;"> |
288 |
</td> |
277 |
<xsl:value-of select="@rtext"/> |
289 |
<xsl:if test="@rtext"> |
278 |
</span><xsl:text> </xsl:text> <!-- Ensure a space follows after </span> --> |
290 |
<!-- Additional right-aligned text cell in section heading. It is used by changelog.xml --> |
279 |
</xsl:if> |
291 |
<td align="right" bgcolor="{$banner-bg}"> |
280 |
<a id="{$name}"><xsl:value-of select="@name"/></a> |
292 |
<font color="{$banner-fg}" face="arial,helvetica.sanserif"> |
281 |
</h3> |
293 |
<strong><xsl:value-of select="@rtext"/></strong></font> |
282 |
<!-- Section body --> |
294 |
</td> |
283 |
<div class="text"> |
295 |
</xsl:if> |
284 |
<xsl:apply-templates/> |
296 |
</tr> |
285 |
</div> |
297 |
<!-- Section body --> |
286 |
|
298 |
<tr><td> |
|
|
299 |
<xsl:if test="@rtext"> |
300 |
<xsl:attribute name="colspan">2</xsl:attribute> |
301 |
</xsl:if> |
302 |
<blockquote> |
303 |
<xsl:apply-templates/> |
304 |
</blockquote></td></tr> |
305 |
</table> |
306 |
</xsl:template> |
287 |
</xsl:template> |
307 |
|
288 |
|
308 |
|
289 |
|
309 |
<!-- Process a documentation subsection --> |
290 |
<!-- Process a documentation subsection --> |
310 |
<xsl:template match="subsection"> |
291 |
<xsl:template match="subsection"> |
311 |
<xsl:variable name="name"> |
292 |
<xsl:variable name="name2"> |
312 |
<xsl:choose> |
293 |
<xsl:choose> |
313 |
<xsl:when test="@anchor"> |
294 |
<xsl:when test="@anchor"> |
314 |
<xsl:value-of select="@anchor" /> |
295 |
<xsl:value-of select="@anchor" /> |
Lines 323-344
Link Here
|
323 |
</xsl:otherwise> |
304 |
</xsl:otherwise> |
324 |
</xsl:choose> |
305 |
</xsl:choose> |
325 |
</xsl:variable> |
306 |
</xsl:variable> |
326 |
<xsl:variable name="name2"> |
307 |
<xsl:variable name="name"> |
327 |
<xsl:value-of select="translate($name, ' #', '__')"/> |
308 |
<xsl:value-of select="translate($name2, ' #', '__')"/> |
328 |
</xsl:variable> |
309 |
</xsl:variable> |
329 |
<table border="0" cellspacing="0" cellpadding="2"> |
310 |
|
330 |
<!-- Subsection heading --> |
311 |
<div class="subsection"> |
331 |
<tr><td bgcolor="{$sub-banner-bg}"> |
312 |
<!-- Subsection heading --> |
332 |
<font color="{$sub-banner-fg}" face="arial,helvetica.sanserif"> |
313 |
<h4> |
333 |
<xsl:if test="$name != $name2"><a name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if> |
314 |
<a id="{$name}"><xsl:value-of select="@name"/></a> |
334 |
<a name="{$name2}"> |
315 |
</h4> |
335 |
<strong><xsl:value-of select="@name"/></strong></a></font> |
316 |
<!-- Subsection body --> |
336 |
</td></tr> |
317 |
<div class="text"> |
337 |
<!-- Subsection body --> |
318 |
<xsl:apply-templates/> |
338 |
<tr><td><blockquote> |
319 |
</div> |
339 |
<xsl:apply-templates/> |
320 |
</div> |
340 |
</blockquote></td></tr> |
321 |
|
341 |
</table> |
|
|
342 |
</xsl:template> |
322 |
</xsl:template> |
343 |
|
323 |
|
344 |
|
324 |
|
Lines 348-354
Link Here
|
348 |
</xsl:template> |
328 |
</xsl:template> |
349 |
|
329 |
|
350 |
<xsl:template mode="toc" match="section|subsection"> |
330 |
<xsl:template mode="toc" match="section|subsection"> |
351 |
<xsl:variable name="name"> |
331 |
<xsl:variable name="name2"> |
352 |
<xsl:choose> |
332 |
<xsl:choose> |
353 |
<xsl:when test="@anchor"> |
333 |
<xsl:when test="@anchor"> |
354 |
<xsl:value-of select="@anchor" /> |
334 |
<xsl:value-of select="@anchor" /> |
Lines 363-372
Link Here
|
363 |
</xsl:otherwise> |
343 |
</xsl:otherwise> |
364 |
</xsl:choose> |
344 |
</xsl:choose> |
365 |
</xsl:variable> |
345 |
</xsl:variable> |
366 |
<xsl:variable name="name2"> |
346 |
<xsl:variable name="name"> |
367 |
<xsl:value-of select="translate($name, ' #', '__')"/> |
347 |
<xsl:value-of select="translate($name2, ' #', '__')"/> |
368 |
</xsl:variable> |
348 |
</xsl:variable> |
369 |
<li><a href="#{$name2}"><xsl:value-of select="@name"/></a> |
349 |
<li><a href="#{$name}"><xsl:value-of select="@name"/></a> |
370 |
<xsl:if test="subsection"> |
350 |
<xsl:if test="subsection"> |
371 |
<ol><xsl:apply-templates mode="toc" select="subsection"/></ol> |
351 |
<ol><xsl:apply-templates mode="toc" select="subsection"/></ol> |
372 |
</xsl:if> |
352 |
</xsl:if> |
Lines 376-434
Link Here
|
376 |
|
356 |
|
377 |
<!-- Process a source code example --> |
357 |
<!-- Process a source code example --> |
378 |
<xsl:template match="source"> |
358 |
<xsl:template match="source"> |
379 |
<xsl:variable name="void"> |
359 |
<div class="codeBox"> |
380 |
<xsl:value-of select="$relative-path"/><xsl:value-of select="$void-image"/> |
360 |
<pre> |
381 |
</xsl:variable> |
361 |
<xsl:if test="@wrapped='true'"> |
382 |
<div align="left"> |
362 |
<xsl:attribute name="class">wrap</xsl:attribute> |
383 |
<table cellspacing="4" cellpadding="0" border="0"> |
363 |
</xsl:if> |
384 |
<tr> |
364 |
<code><xsl:apply-templates/></code> |
385 |
<td bgcolor="{$source-color}" width="1" height="1"> |
365 |
</pre> |
386 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
366 |
</div> |
387 |
</td> |
|
|
388 |
<td bgcolor="{$source-color}" height="1"> |
389 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
390 |
</td> |
391 |
<td bgcolor="{$source-color}" width="1" height="1"> |
392 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
393 |
</td> |
394 |
</tr> |
395 |
<tr> |
396 |
<td bgcolor="{$source-color}" width="1"> |
397 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
398 |
</td> |
399 |
<xsl:choose> |
400 |
<xsl:when test="@wrapped='true'"> |
401 |
<td bgcolor="#ffffff" height="1"> |
402 |
<div class="wrapped-source"> |
403 |
<code> |
404 |
<xsl:apply-templates /> |
405 |
</code> |
406 |
</div> |
407 |
</td> |
408 |
</xsl:when> |
409 |
<xsl:otherwise> |
410 |
<td bgcolor="#ffffff" height="1"><pre> |
411 |
<xsl:value-of select="."/> |
412 |
</pre></td> |
413 |
</xsl:otherwise> |
414 |
</xsl:choose> |
415 |
<td bgcolor="{$source-color}" width="1"> |
416 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
417 |
</td> |
418 |
</tr> |
419 |
<tr> |
420 |
<td bgcolor="{$source-color}" width="1" height="1"> |
421 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
422 |
</td> |
423 |
<td bgcolor="{$source-color}" height="1"> |
424 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
425 |
</td> |
426 |
<td bgcolor="{$source-color}" width="1" height="1"> |
427 |
<img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> |
428 |
</td> |
429 |
</tr> |
430 |
</table> |
431 |
</div> |
432 |
</xsl:template> |
367 |
</xsl:template> |
433 |
|
368 |
|
434 |
|
369 |
|
Lines 446-463
Link Here
|
446 |
|
381 |
|
447 |
<!-- Process an attributes list with nested attribute elements --> |
382 |
<!-- Process an attributes list with nested attribute elements --> |
448 |
<xsl:template match="attributes"> |
383 |
<xsl:template match="attributes"> |
449 |
<table border="1" cellpadding="5"> |
384 |
<table class="defaultTable"> |
450 |
<tr> |
385 |
<tr> |
451 |
<th width="15%" bgcolor="{$attributes-color}"> |
386 |
<th style="width: 15%;"> |
452 |
<font color="#ffffff">Attribute</font> |
387 |
Attribute |
453 |
</th> |
388 |
</th> |
454 |
<th width="85%" bgcolor="{$attributes-color}"> |
389 |
<th style="width: 85%;"> |
455 |
<font color="#ffffff">Description</font> |
390 |
Description |
456 |
</th> |
391 |
</th> |
457 |
</tr> |
392 |
</tr> |
458 |
<xsl:for-each select="attribute"> |
393 |
<xsl:for-each select="attribute"> |
459 |
<tr> |
394 |
<tr> |
460 |
<td align="left" valign="center"> |
395 |
<td> |
461 |
<xsl:if test="@required = 'true'"> |
396 |
<xsl:if test="@required = 'true'"> |
462 |
<strong><code class="attributeName"><xsl:value-of select="@name"/></code></strong> |
397 |
<strong><code class="attributeName"><xsl:value-of select="@name"/></code></strong> |
463 |
</xsl:if> |
398 |
</xsl:if> |
Lines 465-471
Link Here
|
465 |
<code class="attributeName"><xsl:value-of select="@name"/></code> |
400 |
<code class="attributeName"><xsl:value-of select="@name"/></code> |
466 |
</xsl:if> |
401 |
</xsl:if> |
467 |
</td> |
402 |
</td> |
468 |
<td align="left" valign="center"> |
403 |
<td> |
469 |
<xsl:apply-templates/> |
404 |
<xsl:apply-templates/> |
470 |
</td> |
405 |
</td> |
471 |
</tr> |
406 |
</tr> |
Lines 475-495
Link Here
|
475 |
|
410 |
|
476 |
<!-- Process a properties list with nested property elements --> |
411 |
<!-- Process a properties list with nested property elements --> |
477 |
<xsl:template match="properties"> |
412 |
<xsl:template match="properties"> |
478 |
<table border="1" cellpadding="5"> |
413 |
<table class="defaultTable"> |
479 |
<tr> |
414 |
<tr> |
480 |
<th width="15%" bgcolor="{$attributes-color}"> |
415 |
<th style="width: 15%;"> |
481 |
<font color="#ffffff">Property</font> |
416 |
Property |
482 |
</th> |
417 |
</th> |
483 |
<th width="85%" bgcolor="{$attributes-color}"> |
418 |
<th style="width: 85%;"> |
484 |
<font color="#ffffff">Description</font> |
419 |
Description |
485 |
</th> |
420 |
</th> |
486 |
</tr> |
421 |
</tr> |
487 |
<xsl:for-each select="property"> |
422 |
<xsl:for-each select="property"> |
488 |
<tr> |
423 |
<tr> |
489 |
<td align="left" valign="center"> |
424 |
<td> |
490 |
<code class="propertyName"><xsl:value-of select="@name"/></code> |
425 |
<code class="propertyName"><xsl:value-of select="@name"/></code> |
491 |
</td> |
426 |
</td> |
492 |
<td align="left" valign="center"> |
427 |
<td> |
493 |
<xsl:apply-templates/> |
428 |
<xsl:apply-templates/> |
494 |
</td> |
429 |
</td> |
495 |
</tr> |
430 |
</tr> |
Lines 517-605
Link Here
|
517 |
<a href="{$href}"><xsl:apply-templates/></a> |
452 |
<a href="{$href}"><xsl:apply-templates/></a> |
518 |
</xsl:when> |
453 |
</xsl:when> |
519 |
<xsl:otherwise> |
454 |
<xsl:otherwise> |
520 |
<xsl:variable name="name" select="@name"/> |
455 |
<xsl:variable name="name"> |
521 |
<a name="{$name}"><xsl:apply-templates/></a> |
456 |
<xsl:choose> |
|
|
457 |
<xsl:when test="@name"> |
458 |
<xsl:value-of select="@name"/> |
459 |
</xsl:when> |
460 |
<xsl:otherwise> |
461 |
<xsl:value-of select="@id"/> |
462 |
</xsl:otherwise> |
463 |
</xsl:choose> |
464 |
</xsl:variable> |
465 |
<a id="{$name}"><xsl:apply-templates/></a> |
522 |
</xsl:otherwise> |
466 |
</xsl:otherwise> |
523 |
</xsl:choose> |
467 |
</xsl:choose> |
|
|
468 |
<!-- |
469 |
TODO: What if <a> has not only "href" or only "id", but also other attributes? |
470 |
Maybe use something like <a ...><xsl:copy-of select="@*"/><xsl:apply-templates/></a>, |
471 |
then also remove the <xsl:otherwise> because the "id" attribute would be copied from |
472 |
the original element. |
473 |
--> |
524 |
</xsl:template> |
474 |
</xsl:template> |
525 |
|
475 |
|
526 |
<!-- Changelog related tags --> |
476 |
<!-- Changelog related tags --> |
527 |
<xsl:template match="changelog"> |
477 |
<xsl:template match="changelog"> |
528 |
<table border="0" cellpadding="2" cellspacing="2"> |
478 |
<ul class="changelog"> |
529 |
<xsl:apply-templates/> |
479 |
<xsl:apply-templates/> |
530 |
</table> |
480 |
</ul> |
531 |
</xsl:template> |
481 |
</xsl:template> |
532 |
|
482 |
|
533 |
<xsl:template match="changelog/add"> |
483 |
<xsl:template match="changelog/add"> |
534 |
<tr> |
484 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/add.gif</xsl:variable> |
535 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/add.gif</xsl:variable> |
485 |
<li> |
536 |
<td><img alt="add" class="icon" src="{$src}"/></td> |
486 |
<img alt="Add: " class="icon" src="{$src}"/><xsl:apply-templates/> |
537 |
<td><xsl:apply-templates/></td> |
487 |
</li> |
538 |
</tr> |
|
|
539 |
</xsl:template> |
488 |
</xsl:template> |
540 |
|
489 |
|
541 |
<xsl:template match="changelog/update"> |
490 |
<xsl:template match="changelog/update"> |
542 |
<tr> |
491 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/update.gif</xsl:variable> |
543 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/update.gif</xsl:variable> |
492 |
<li> |
544 |
<td><img alt="update" class="icon" src="{$src}"/></td> |
493 |
<img alt="Update: " class="icon" src="{$src}"/><xsl:apply-templates/> |
545 |
<td><xsl:apply-templates/></td> |
494 |
</li> |
546 |
</tr> |
|
|
547 |
</xsl:template> |
495 |
</xsl:template> |
548 |
|
496 |
|
549 |
<xsl:template match="changelog/design"> |
497 |
<xsl:template match="changelog/design"> |
550 |
<tr> |
498 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/design.gif</xsl:variable> |
551 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/design.gif</xsl:variable> |
499 |
<li> |
552 |
<td><img alt="design" class="icon" src="{$src}"/></td> |
500 |
<img alt="Design: " class="icon" src="{$src}"/><xsl:apply-templates/> |
553 |
<td><xsl:apply-templates/></td> |
501 |
</li> |
554 |
</tr> |
|
|
555 |
</xsl:template> |
502 |
</xsl:template> |
556 |
|
503 |
|
557 |
<xsl:template match="changelog/docs"> |
504 |
<xsl:template match="changelog/docs"> |
558 |
<tr> |
505 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/docs.gif</xsl:variable> |
559 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/docs.gif</xsl:variable> |
506 |
<li> |
560 |
<td><img alt="docs" class="icon" src="{$src}"/></td> |
507 |
<img alt="Docs: " class="icon" src="{$src}"/><xsl:apply-templates/> |
561 |
<td><xsl:apply-templates/></td> |
508 |
</li> |
562 |
</tr> |
|
|
563 |
</xsl:template> |
509 |
</xsl:template> |
564 |
|
510 |
|
565 |
<xsl:template match="changelog/fix"> |
511 |
<xsl:template match="changelog/fix"> |
566 |
<tr> |
512 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/fix.gif</xsl:variable> |
567 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/fix.gif</xsl:variable> |
513 |
<li> |
568 |
<td><img alt="fix" class="icon" src="{$src}"/></td> |
514 |
<img alt="Fix: " class="icon" src="{$src}"/><xsl:apply-templates/> |
569 |
<td><xsl:apply-templates/></td> |
515 |
</li> |
570 |
</tr> |
|
|
571 |
</xsl:template> |
516 |
</xsl:template> |
572 |
|
517 |
|
573 |
<xsl:template match="changelog/scode"> |
518 |
<xsl:template match="changelog/scode"> |
574 |
<tr> |
519 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/code.gif</xsl:variable> |
575 |
<xsl:variable name="src"><xsl:value-of select="$relative-path"/>/images/code.gif</xsl:variable> |
520 |
<li> |
576 |
<td><img alt="code" class="icon" src="{$src}"/></td> |
521 |
<img alt="Code: " class="icon" src="{$src}"/><xsl:apply-templates/> |
577 |
<td><xsl:apply-templates/></td> |
522 |
</li> |
578 |
</tr> |
|
|
579 |
</xsl:template> |
523 |
</xsl:template> |
580 |
|
524 |
|
581 |
<!-- Process an attributes list with nested attribute elements --> |
525 |
<!-- Process an attributes list with nested attribute elements --> |
582 |
<xsl:template match="status"> |
526 |
<xsl:template match="status"> |
583 |
<table border="1" cellpadding="5"> |
527 |
<table class="defaultTable"> |
584 |
<tr> |
528 |
<tr> |
585 |
<th width="15%" bgcolor="{$attributes-color}"> |
529 |
<th style="width: 15%;"> |
586 |
<font color="#ffffff">Priority</font> |
530 |
Priority |
587 |
</th> |
531 |
</th> |
588 |
<th width="50%" bgcolor="{$attributes-color}"> |
532 |
<th style="width: 50%;"> |
589 |
<font color="#ffffff">Action Item</font> |
533 |
Action Item |
590 |
</th> |
534 |
</th> |
591 |
<th width="25%" bgcolor="{$attributes-color}"> |
535 |
<th style="width: 25%;"> |
592 |
<font color="#ffffff">Volunteers</font> |
536 |
Volunteers |
593 |
</th> |
537 |
</th> |
594 |
<xsl:for-each select="item"> |
538 |
<xsl:for-each select="item"> |
595 |
<tr> |
539 |
<tr> |
596 |
<td align="left" valign="center"> |
540 |
<td> |
597 |
<xsl:value-of select="@priority"/> |
541 |
<xsl:value-of select="@priority"/> |
598 |
</td> |
542 |
</td> |
599 |
<td align="left" valign="center"> |
543 |
<td> |
600 |
<xsl:apply-templates/> |
544 |
<xsl:apply-templates/> |
601 |
</td> |
545 |
</td> |
602 |
<td align="left" valign="center"> |
546 |
<td> |
603 |
<xsl:value-of select="@owner"/> |
547 |
<xsl:value-of select="@owner"/> |
604 |
</td> |
548 |
</td> |
605 |
</tr> |
549 |
</tr> |
Lines 620-647
Link Here
|
620 |
<a href="{$link}">r<xsl:apply-templates/></a> |
564 |
<a href="{$link}">r<xsl:apply-templates/></a> |
621 |
</xsl:template> |
565 |
</xsl:template> |
622 |
|
566 |
|
623 |
<!-- specially process td tags ala site.vsl --> |
|
|
624 |
<xsl:template match="table[@class='detail-table']/tr/td"> |
625 |
<td bgcolor="{$table-td-bg}" valign="top" align="left"> |
626 |
<xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute></xsl:if> |
627 |
<xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute></xsl:if> |
628 |
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> |
629 |
<xsl:apply-templates/> |
630 |
</font> |
631 |
</td> |
632 |
</xsl:template> |
633 |
|
634 |
<!-- handle th ala site.vsl --> |
635 |
<xsl:template match="table[@class='detail-table']/tr/th"> |
636 |
<td bgcolor="{$table-th-bg}" valign="top"> |
637 |
<xsl:if test="@colspan"><xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute></xsl:if> |
638 |
<xsl:if test="@rowspan"><xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute></xsl:if> |
639 |
<font color="#000000" size="-1" face="arial,helvetica,sanserif"> |
640 |
<xsl:apply-templates /> |
641 |
</font> |
642 |
</td> |
643 |
</xsl:template> |
644 |
|
645 |
<!-- Process everything else by just passing it through --> |
567 |
<!-- Process everything else by just passing it through --> |
646 |
<xsl:template match="*|@*"> |
568 |
<xsl:template match="*|@*"> |
647 |
<xsl:copy> |
569 |
<xsl:copy> |