You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

templates.vm 17 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  1. #*
  2. * ============================================================================
  3. * The Apache Software License, Version 1.1
  4. * ============================================================================
  5. *
  6. * Copyright (C) 2000-2002 The Apache Software Foundation. All
  7. * rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without modifica-
  10. * tion, are permitted provided that the following conditions are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright notice,
  13. * this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright notice,
  16. * this list of conditions and the following disclaimer in the documentation
  17. * and/or other materials provided with the distribution.
  18. *
  19. * 3. The end-user documentation included with the redistribution, if any, must
  20. * include the following acknowledgment: "This product includes software
  21. * developed by the Apache Software Foundation (http://www.apache.org/)."
  22. * Alternately, this acknowledgment may appear in the software itself, if
  23. * and wherever such third-party acknowledgments normally appear.
  24. *
  25. * 4. The names "Ant" and "Apache Software Foundation" must not be used to
  26. * endorse or promote products derived from this software without prior
  27. * written permission. For written permission, please contact
  28. * apache@apache.org.
  29. *
  30. * 5. Products derived from this software may not be called "Apache", nor may
  31. * "Apache" appear in their name, without prior written permission of the
  32. * Apache Software Foundation.
  33. *
  34. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
  35. * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  36. * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  37. * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  38. * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
  39. * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  40. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  41. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  42. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  43. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  44. *
  45. * This software consists of voluntary contributions made by many individuals
  46. * on behalf of the Apache Software Foundation. For more information on the
  47. * Apache Software Foundation, please see <http://www.apache.org/>.
  48. *
  49. *#
  50. ## This is where the common macro's live
  51. #macro ( table $table)
  52. <table>
  53. #foreach ( $items in $table.getChildren() )
  54. #if ($items.getName().equals("tr"))
  55. #tr ($items)
  56. #end
  57. #end
  58. </table>
  59. #end
  60. #macro ( tr $tr)
  61. <tr>
  62. #foreach ( $items in $tr.getChildren() )
  63. #if ($items.getName().equals("td"))
  64. #td ($items)
  65. #elseif ($items.getName().equals("th"))
  66. #th ($items)
  67. #end
  68. #end
  69. </tr>
  70. #end
  71. #macro ( td $value)
  72. #if ($value.getAttributeValue("colspan"))
  73. #set ($colspan = $value.getAttributeValue("colspan"))
  74. #end
  75. #if ($value.getAttributeValue("rowspan"))
  76. #set ($rowspan = $value.getAttributeValue("rowspan"))
  77. #end
  78. <td bgcolor="$tabletdbg" colspan="$!colspan" rowspan="$!rowspan"
  79. valign="top" align="left">
  80. <font color="$darkfg" size="-1" face="arial,helvetica,sanserif">
  81. #if ($value.getText().length() != 0 || $value.hasChildren())
  82. $xmlout.outputString($value, true)
  83. #else
  84. &nbsp;
  85. #end
  86. </font>
  87. </td>
  88. #end
  89. #macro ( th $value)
  90. #if ($value.getAttributeValue("colspan"))
  91. #set ($colspan = $value.getAttributeValue("colspan"))
  92. #end
  93. #if ($value.getAttributeValue("rowspan"))
  94. #set ($rowspan = $value.getAttributeValue("rowspan"))
  95. #end
  96. <td bgcolor="$tablethbg" colspan="$!colspan" rowspan="$!rowspan"
  97. valign="top" align="left">
  98. <font color="$darkfg" size="-1" face="arial,helvetica,sanserif">
  99. #if ($value.getText().length() != 0 || $value.hasChildren())
  100. $xmlout.outputString($value, true)
  101. #else
  102. &nbsp;
  103. #end
  104. </font>
  105. </td>
  106. #end
  107. #macro ( projectanchor $name $value )
  108. #if ($value.startsWith("http://"))
  109. <a href="$value">$name</a>
  110. #elseif ($value.startsWith("/site"))
  111. <a href="http://jakarta.apache.org$value">$name</a>
  112. #else
  113. <a href="$relativePath$value">$name</a>
  114. #end
  115. #end
  116. #macro ( metaauthor $author $email )
  117. <meta name="author" value="$author">
  118. <meta name="email" value="$email">
  119. #end
  120. #macro ( image $value )
  121. #if ($value.getAttributeValue("width"))
  122. #set ($width=$value.getAttributeValue("width"))
  123. #end
  124. #if ($value.getAttributeValue("height"))
  125. #set ($height=$value.getAttributeValue("height"))
  126. #end
  127. #if ($value.getAttributeValue("align"))
  128. #set ($align=$value.getAttributeValue("align"))
  129. #end
  130. <img src="$relativePath$value.getAttributeValue("src")"
  131. width="$!width" height="$!height" align="$!align">
  132. #end
  133. #macro ( source $value)
  134. <div align="left">
  135. <table cellspacing="4" cellpadding="0" border="0">
  136. <tr>
  137. <td bgcolor="$sourceborder" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  138. <td bgcolor="$sourceborder" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  139. <td bgcolor="$sourceborder" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  140. </tr>
  141. <tr>
  142. <td bgcolor="$sourceborder" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  143. <td bgcolor="$lightbg"><pre>$escape.getText($value.getText())</pre></td>
  144. <td bgcolor="$sourceborder" width="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  145. </tr>
  146. <tr>
  147. <td bgcolor="$sourceborder" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  148. <td bgcolor="$sourceborder" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  149. <td bgcolor="$sourceborder" width="1" height="1"><img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/></td>
  150. </tr>
  151. </table>
  152. </div>
  153. #end
  154. #macro ( makeProject )
  155. #set ($menus = $project.getChild("body").getChildren("menu"))
  156. <div class="menu"><ul>
  157. #foreach ( $menu in $menus )
  158. <li><font color="$blue1">$menu.getAttributeValue("name")</font>
  159. <ul>
  160. #foreach ( $item in $menu.getChildren() )
  161. #set ($name = $item.getAttributeValue("name"))
  162. #set ($current = $root.getChild("properties").getChild("title").getText() )
  163. <li>
  164. #if ( $current.trim().equals( $name ) )
  165. <span class="sel"><font color="$active">$name</font></span>
  166. #else
  167. #projectanchor($name $item.getAttributeValue("href"))
  168. #end
  169. </li>
  170. #end
  171. </ul>
  172. </li>
  173. #end
  174. </ul>
  175. #end
  176. #macro (getProjectImage)
  177. #if ($project.getChild("logo"))
  178. <td align="left">
  179. <a href="http://jakarta.apache.org"><img src="images/jakarta-logo.gif" border="0"/></a>
  180. </td>
  181. <td align="right">
  182. #set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
  183. #if ( $logoString.startsWith("/") )
  184. <a href="$project.getAttributeValue("href")"><img src="$relativePath$logoString" alt="$project.getChild("logo").getText()" border="0"/></a>
  185. #else
  186. <a href="$project.getAttributeValue("href")"><img src="$relativePath/$logoString" alt="$project.getChild("logo").getText()" border="0"/></a>
  187. #end
  188. </td>
  189. #else
  190. <td colspan="2">
  191. <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" align="left" border="0"/></a>
  192. </td>
  193. #end
  194. #end
  195. #macro (header)
  196. <html>
  197. <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
  198. <head>
  199. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  200. <title>$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()</title>
  201. <link type="text/css" href="page.css" rel="stylesheet">
  202. #set ($authors = $root.getChild("properties").getChildren("author"))
  203. #foreach ( $au in $authors )
  204. #metaauthor ( $au.getText() $au.getAttributeValue("email") )
  205. #end
  206. </head>
  207. <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" text="$darkfg" bgcolor="$lightbg">
  208. <table summary="navigation path" width="100%" border="0" cellpadding="0" cellspacing="0">
  209. <tr>
  210. <td nowrap="nowrap" valign="middle" bgcolor="$blue1" height="20"><img height="1" width="5" alt="" border="0" src="images/spacer.gif"><font size="2" face="Arial, Helvetica, Sans-serif"><script src="breadcrumbs.js" language="JavaScript" type="text/javascript"></script></font></td>
  211. </tr>
  212. <tr>
  213. <td bgcolor="$blue2" height="2"><img height="2" width="2" alt="" border="0" src="images/spacer.gif"></td>
  214. </tr>
  215. </table>
  216. <table summary="header with logos" width="100%" border="0" cellpadding="0" cellspacing="0">
  217. <tr>
  218. <td bgcolor="$blue3"><a href="http://ant.apache.org/"><img border="0" alt="Apache XML logo" src="images/group-logo.gif"></a></td><td width="100%" align="center" bgcolor="$blue3"><a href="http://ant.apache.org/"><img alt="Apache XML site" border="0" src="images/project-logo.gif"></a></td><td valign="top" rowspan="2" bgcolor="$blue3">
  219. <form target="_blank" onsubmit="q.value = query.value + ' site:ant.apache.org'" action="http://www.google.com/search" method="get">
  220. <table summary="search" border="0" cellspacing="0" cellpadding="0" bgcolor="$blue2">
  221. <tr>
  222. <td colspan="3"><img height="10" width="1" alt="" src="images/spacer.gif"></td>
  223. </tr>
  224. <tr>
  225. <td><img height="1" width="1" alt="" src="images/spacer.gif"></td><td nowrap="nowrap"><input name="q" type="hidden"><input size="15" id="query" type="text"><img height="1" width="5" alt="" src="images/spacer.gif"><input name="Search" value="Search" type="submit">
  226. <br>
  227. <font face="Arial, Helvetica, Sans-serif" size="2" color="white">
  228. the Apache Ant site
  229. </font></td><td><img height="1" width="1" alt="" src="images/spacer.gif"></td>
  230. </tr>
  231. <tr>
  232. <td><img alt="" border="0" height="10" width="9" src="images/search-left.gif"></td><td><img height="1" width="1" alt="" src="images/spacer.gif"></td><td><img alt="" border="0" height="10" width="9" src="images/search-right.gif"></td>
  233. </tr>
  234. </table>
  235. </form>
  236. </td><td bgcolor="$blue3"><img height="10" width="10" alt="" src="images/spacer.gif"></td>
  237. </tr>
  238. <tr>
  239. <td valign="bottom" bgcolor="$blue3" colspan="2">
  240. <div class="tab">
  241. <table summary="tab bar" border="0" cellpadding="0" cellspacing="0">
  242. <tr>
  243. <td width="8"><img alt="" height="8" width="8" src="images/spacer.gif"></td><td valign="bottom">
  244. <table summary="selected tab" height="30" border="0" cellpadding="0" cellspacing="0">
  245. <tr>
  246. <td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="images/tabSel-left.gif"></td><td valign="middle" bgcolor="$blue2"><font color="$lightfg" size="2" face="Arial, Helvetica, Sans-serif"><b>Home</b></font></td><td valign="top" width="5" bgcolor="$blue2"><img height="5" width="5" alt="" src="images/tabSel-right.gif"></td>
  247. </tr>
  248. </table>
  249. </td>
  250. </tr>
  251. </table>
  252. </div>
  253. </td><td bgcolor="$blue3"><img alt="" width="1" height="1" src="images/spacer.gif"></td>
  254. </tr>
  255. <tr>
  256. <td bgcolor="$blue2" colspan="4"><img width="1" height="10" alt="" src="images/spacer.gif"></td>
  257. </tr>
  258. </table>
  259. <table summary="page content" bgcolor="$lightbg" width="100%" border="0" cellpadding="0" cellspacing="0">
  260. <tr>
  261. <td valign="top">
  262. <table summary="menu" border="0" cellspacing="0" cellpadding="0">
  263. <tr>
  264. <td rowspan="3" valign="top">
  265. <table summary="blue line" border="0" cellpadding="0" cellspacing="0">
  266. <tr>
  267. <td bgcolor="$blue3"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  268. </tr>
  269. <tr>
  270. <td bgcolor="$blue1"><font color="$blue2" size="4" face="Arial, Helvetica, Sans-serif">&nbsp;</font></td>
  271. </tr>
  272. <tr>
  273. <td bgcolor="$blue3"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  274. </tr>
  275. </table>
  276. </td><td bgcolor="$blue3"><img width="1" height="1" alt="" src="images/spacer.gif"></td><td valign="bottom" bgcolor="$blue2"><img width="10" height="10" alt="" src="images/spacer.gif"></td><td nowrap="nowrap" valign="top" bgcolor="$blue2">
  277. #makeProject()
  278. </td><td valign="bottom" bgcolor="$blue2"><img width="10" height="10" alt="" src="images/spacer.gif"></td><td bgcolor="$blue3"><img width="1" height="1" alt="" src="images/spacer.gif"></td>
  279. </tr>
  280. <tr>
  281. <td valign="bottom" align="left" colspan="2" rowspan="2" bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="images/menu-left.gif"></td><td bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="images/spacer.gif"></td><td valign="bottom" align="right" colspan="2" rowspan="2" bgcolor="$blue2"><img height="10" width="10" border="0" alt="" src="images/menu-right.gif"></td>
  282. </tr>
  283. <tr>
  284. <td height="1" bgcolor="$blue3"><img width="1" height="1" alt="" src="images/spacer.gif"></td>
  285. </tr>
  286. </table>
  287. </td><td valign="top" width="100%">
  288. <table summary="content" width="100%" border="0" cellpadding="0" cellspacing="0">
  289. <tr>
  290. <td colspan="4" bgcolor="$blue3"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  291. </tr>
  292. <tr>
  293. <td align="left" width="10" bgcolor="$blue1"><img width="10" height="1" alt="" src="images/spacer.gif"></td><td align="left" width="50%" bgcolor="$blue1"><font color="$blue2" size="3" face="Arial, Helvetica, Sans-serif">
  294. &nbsp;
  295. </font><img width="10" height="8" alt="" src="images/spacer.gif"></td><td align="right" width="50%" bgcolor="$blue1"><font color="$blue2" size="3" face="Arial, Helvetica, Sans-serif">
  296. &nbsp;
  297. </font><img width="10" height="8" alt="" src="images/spacer.gif"></td><td width="10" bgcolor="$blue1"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  298. </tr>
  299. <tr>
  300. <td colspan="4" bgcolor="$blue3"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  301. </tr>
  302. <tr>
  303. <td align="left" width="10"><img width="10" height="1" alt="" src="images/spacer.gif"></td><td align="left" width="100%">
  304. <div class="content">
  305. #end
  306. #macro (footer)
  307. </div>
  308. </td><td width="10"><img width="10" height="1" alt="" src="images/spacer.gif"></td>
  309. </tr>
  310. </table>
  311. </td>
  312. </tr>
  313. </table>
  314. <table summary="footer" cellspacing="0" cellpadding="0" width="100%" height="20" border="0">
  315. <tr>
  316. <td colspan="2" height="1" bgcolor="$blue2"><img height="1" width="1" alt="" src="images/spacer.gif"><a href="images/label.gif"></a><a href="images/page.gif"></a><a href="images/chapter.gif"></a><a href="images/chapter_open.gif"></a><a href="images/current.gif"></a><a href="/favicon.ico"></a></td>
  317. </tr>
  318. <tr>
  319. <td colspan="2" bgcolor="$blue1" class="copyright" align="center"><font size="2" face="Arial, Helvetica, Sans-Serif">Copyright &copy;
  320. 2002&nbsp;The Apache Software Foundation. All rights reserved.<script type="text/javascript" language="JavaScript"><!--
  321. document.write(" - "+"Last Published: " + document.lastModified);
  322. // --></script></font></td>
  323. </tr>
  324. </table>
  325. </body>
  326. </html>
  327. #end