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.

task.dvsl 12 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. #*
  2. * DVSL Stylesheet to format the Ant Task documentation.
  3. *#
  4. #set( $relative-path = "../../" )
  5. #if (false)
  6. #set( $body-bg = '#ffffff' )
  7. #set( $body-fg = '#000000' )
  8. #set( $body-link = '#525D76' )
  9. ##set( $banner-bg = '#EEEEEE')
  10. #set( $banner-fg = '#000000')
  11. #set( $sub-banner-bg = '#828DA6')
  12. #set( $sub-banner-fg = '#ffffff')
  13. ##set( $table-th-bg = '#FFEEEE')
  14. ##set( $table-td-bg = '#FFEEEE')
  15. ##set( $source-color = '#CCFFFF')
  16. #set( $table-th-bg = '#EEEEEE')
  17. #set( $table-td-bg = '#EEEEEE')
  18. #set( $banner-bg = '#a0ddf0')
  19. ##set( $banner-bg = '#525D76')
  20. ##set( $table-th-bg = '#039acc')
  21. ##set( $table-td-bg = '#a0ddf0')
  22. #set( $source-color = '#023264')
  23. #end
  24. #set( $body-bg = '#ffffff' )
  25. #set( $body-fg = '#000000' )
  26. #set( $body-link = '#525D76' )
  27. #set( $banner-bg = '#525D76')
  28. #set( $banner-fg = '#ffffff')
  29. #set( $sub-banner-bg = '#828DA6')
  30. #set( $sub-banner-fg = '#ffffff')
  31. #set( $table-th-bg = '#cccccc')
  32. #set( $table-td-bg = '#eeeeee')
  33. #set( $source-color = '#023264')
  34. #set( $source-font-size = '+0')
  35. ## Double quote for convenience
  36. #set ($qq = '"')
  37. ## Macro to output argument if test evaluates to true
  38. #macro(ifset $test $output)
  39. #if ( $test )$output#end
  40. #end
  41. ## Macro to capitalize a word making the first letter upper case
  42. #macro(capitalize $word)
  43. $word.substring(0,1).toUpperCase()$word.substring(1)
  44. #end
  45. #match( "task" )
  46. #set( $project = $node.selectSingleNode("document('xdocs/stylesheets/project.xml')/project" ) )
  47. #if ($node.name().equals("task"))
  48. #set( $title = "#capitalize($attrib.name) Task" )
  49. #set( $summary = $node.short-description )
  50. #end
  51. <html>
  52. <head>
  53. <meta http-equiv="Content-Language" content="en-us">
  54. <title>$title</title>
  55. </head>
  56. <body bgcolor="$body-bg" text="$body-fg" link="$body-link"
  57. alink="$body-link" vlink="$body-link">
  58. <table border="0" width="100%" cellspacing="4">
  59. <!-- PAGE HEADER -->
  60. <tr>
  61. <td>
  62. <table border="0" width="100%"><tr>
  63. <td valign="bottom">
  64. <font size="+3" face="arial,helvetica,sanserif"><strong>$title</strong></font>
  65. #* *##if( $summary )
  66. <br><font face="arial,helvetica,sanserif">$summary</font>
  67. #* *##end
  68. </td>
  69. <td>
  70. #* *##if( $project.logo )
  71. #set( $alt = $project.logo )
  72. #set( $home = $project.attribute("href") )
  73. #set( $src = $project.logo.attribute( "href" ) )
  74. <!-- PROJECT LOGO -->
  75. <a href="$home">
  76. <img src="${relative-path}$src" align="right" alt="$alt" border="0"/>
  77. </a>
  78. #* *##end
  79. </td>
  80. </tr></table>
  81. </td>
  82. </tr>
  83. <!-- START RIGHT SIDE MAIN BODY -->
  84. <tr>
  85. <td valign="top" align="left">
  86. #* *##if ($node.name().equals("task"))
  87. #* Use description from merged XML if available, else javadoc comment *#
  88. #* *##if ($node.external.description)
  89. <!-- Applying task/description -->
  90. #* *#$context.applyTemplates("external/description")
  91. #* *##else
  92. <!-- Applying task/long-description -->
  93. #* *#$context.applyTemplates("long-description")
  94. #* *##end
  95. #* *#$context.applyTemplates("structure/attributes")
  96. #* *#$context.applyTemplates("structure/elements")
  97. #* *#$context.applyTemplates("external/section")
  98. #* *##end
  99. </td>
  100. </tr>
  101. <!-- END RIGHT SIDE MAIN BODY -->
  102. <!-- FOOTER SEPARATOR -->
  103. <tr>
  104. <td>
  105. <hr noshade="" size="1"/>
  106. </td>
  107. </tr>
  108. <!-- PAGE FOOTER -->
  109. <tr>
  110. <td>
  111. <div align="center"><font color="$body-link" size="-1"><em>
  112. Copyright &#169; 2000-2002, Apache Software Foundation
  113. </em></font></div>
  114. </td>
  115. </tr>
  116. </table>
  117. </body>
  118. </html>
  119. #end
  120. #*
  121. Macro to format a table heading cell
  122. *#
  123. #macro( th $text )
  124. <td bgcolor="$table-th-bg" valign="top" align="left">
  125. <font color="#000000" size="-1" face="arial,helvetica,sanserif"><b>$text</b></font>
  126. </td>
  127. #end
  128. #*
  129. Macro to format a table body cell
  130. *#
  131. #macro( td $text )
  132. <td bgcolor="$table-td-bg" valign="top" align="left">
  133. <font color="#000000" size="-1" face="arial,helvetica,sanserif">$text</font>
  134. </td>
  135. #end
  136. #*
  137. Macro to format a section banner
  138. *#
  139. #macro( section $anchor $name )
  140. <tr><td bgcolor="$banner-bg">
  141. <font color="$banner-fg" face="arial,helvetica.sanserif">
  142. <a name="$anchor">
  143. <strong>$name</strong></a></font>
  144. </td></tr>
  145. #end
  146. #*
  147. Macro to format a subsection banner
  148. *#
  149. #macro( subsection $anchor $name )
  150. <tr><td bgcolor="$sub-banner-bg">
  151. <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
  152. <a name="$anchor">
  153. <strong>$name</strong></a></font>
  154. </td></tr>
  155. #end
  156. #*
  157. Process javadoc long description section
  158. *#
  159. #match( "long-description" )
  160. <!-- Start Description -->
  161. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  162. <tr><td>&nbsp;</td></tr>
  163. #* *##section("description" "Description")
  164. <tr><td><blockquote>
  165. $node.value().trim()
  166. </blockquote></td></tr>
  167. </table>
  168. <!-- End Description -->
  169. #end
  170. #*
  171. Process external desciption
  172. *#
  173. #match( "external/description" )
  174. <!-- Start Description -->
  175. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  176. <tr><td>&nbsp;</td></tr>
  177. #* *##section("description" "Description")
  178. <tr><td><blockquote>
  179. #* *#$context.applyTemplates("*")
  180. </blockquote></td></tr>
  181. </table>
  182. <!-- End Description -->
  183. #end
  184. #*
  185. Process top level attributes
  186. *#
  187. #match( "structure/attributes" )
  188. <!-- Start Attributes -->
  189. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  190. <tr><td>&nbsp;</td></tr>
  191. #* *##section("attributes" "Parameters")
  192. <tr><td><blockquote>
  193. <table>
  194. <tr>
  195. #* *##th("Attribute")
  196. #* *##th("Description")
  197. #* *##th("Type")
  198. </tr>
  199. #* *#$context.applyTemplates("*")
  200. </table>
  201. </blockquote></td></tr>
  202. </table>
  203. <!-- End Attributes -->
  204. #end
  205. #*
  206. Process a single attribute
  207. *#
  208. #match( "attribute" )
  209. <!-- Attribute -->
  210. <tr>
  211. #* *##td($attrib.name)
  212. #* *##td($node.description)
  213. #* *##td($attrib.type)
  214. </tr>
  215. #end
  216. #*
  217. Process all elements
  218. *#
  219. #match( "elements" )
  220. <!-- Start Elements -->
  221. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  222. <tr><td>&nbsp;</td></tr>
  223. #* *##section("elements" "Parameters as nested elements")
  224. <tr><td><blockquote>
  225. #* *#$context.applyTemplates("*")
  226. </blockquote></td></tr>
  227. </table>
  228. <!-- End Elements -->
  229. #end
  230. #*
  231. Process a single element
  232. *#
  233. #match( "element" )
  234. <!-- Start Element -->
  235. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  236. <tr><td>&nbsp;</td></tr>
  237. <tr><td bgcolor="$sub-banner-bg">
  238. <font color="$sub-banner-fg" face="arial,helvetica.sanserif" size="-1">
  239. <strong>$attrib.name</strong> ($attrib.type)</font>
  240. </td></tr>
  241. <tr><td><blockquote>
  242. $node.description.toString().trim()
  243. #* *#$context.applyTemplates("*")
  244. </blockquote></td></tr>
  245. </table>
  246. <!-- End Element -->
  247. #end
  248. #*
  249. Process attributes within elements
  250. *#
  251. #match( "element/attributes" )
  252. <!-- Start Attributes -->
  253. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  254. <tr><td>&nbsp;</td></tr>
  255. <tr><td>
  256. <table>
  257. <tr>
  258. #* *##th("Attribute")
  259. #* *##th("Description")
  260. #* *##th("Type")
  261. </tr>
  262. #* *#$context.applyTemplates("*")
  263. </table>
  264. </td></tr>
  265. </table>
  266. <!-- End Attributes -->
  267. #end
  268. #*
  269. * Process a menu for the navigation bar
  270. *#
  271. #match( "menu" )
  272. <tr><td>
  273. <p>
  274. <strong>$attrib.name</strong>
  275. </p>
  276. </td><td>
  277. <ul>
  278. $context.applyTemplates("item")
  279. </ul></td></tr>
  280. #end
  281. #*
  282. * Process a menu item for the navigation bar
  283. *#
  284. #match( "item" )
  285. #if( $attrib.href.endsWith("$outputfilename") && !$attrib.href.startsWith("http"))
  286. <strong>$attrib.name</strong>
  287. #else
  288. #if( $attrib.href.startsWith("http") )
  289. <a href="$attrib.href">$attrib.name</a>
  290. #else
  291. <a href="${relative-path}$attrib.href">$attrib.name</a>
  292. #end
  293. #end
  294. #end
  295. #*
  296. * process a documentation section
  297. *#
  298. #match( "section" )
  299. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  300. <tr><td>&nbsp;</td></tr>
  301. <tr><td bgcolor="$banner-bg">
  302. <font color="$banner-fg" face="arial,helvetica.sanserif">
  303. #if ( $attrib.anchor )
  304. #set( $anchor = $attrib.anchor )
  305. #else
  306. #set( $anchor = $attrib.name )
  307. #end
  308. <a name="$anchor">
  309. <strong>$attrib.name</strong></a></font>
  310. </td></tr>
  311. <tr><td><blockquote>
  312. $context.applyTemplates("*")
  313. </blockquote></td></tr>
  314. </table>
  315. #end
  316. #match( "subsection" )
  317. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  318. <!-- Subsection heading -->
  319. <tr><td bgcolor="$sub-banner-bg">
  320. <font color="$sub-banner-fg" face="arial,helvetica.sanserif">
  321. #if ( $attrib.anchor )
  322. #set( $anchor = $attrib.anchor )
  323. #else
  324. #set( $anchor = $attrib.name )
  325. #end
  326. <a name="$anchor">
  327. <strong>$attrib.name</strong></a></font>
  328. </td></tr>
  329. <!-- Subsection body -->
  330. <tr><td>
  331. $context.applyTemplates("*")
  332. </td></tr>
  333. </table>
  334. #end
  335. #match( "source" )
  336. <div align="left">
  337. <table cellspacing="4" cellpadding="0" border="0">
  338. <tr>
  339. <td bgcolor="$source-color" width="1" height="1">
  340. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  341. </td>
  342. <td bgcolor="$source-color" height="1">
  343. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  344. </td>
  345. <td bgcolor="$source-color" width="1" height="1">
  346. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  347. </td>
  348. </tr>
  349. <tr>
  350. <td bgcolor="$source-color" width="1">
  351. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  352. </td>
  353. <td bgcolor="#ffffff" height="1">
  354. <font size="$source-font-size"><pre>$toolbox.htmlescape.getText( $node.value() )</pre></font>
  355. </td>
  356. <td bgcolor="$source-color" width="1">
  357. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  358. </td>
  359. </tr>
  360. <tr>
  361. <td bgcolor="$source-color" width="1" height="1">
  362. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  363. </td>
  364. <td bgcolor="$source-color" height="1">
  365. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  366. </td>
  367. <td bgcolor="$source-color" width="1" height="1">
  368. <img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0" border="0"/>
  369. </td>
  370. </tr>
  371. </table>
  372. </div>
  373. #end
  374. #match("table")
  375. <table>
  376. $context.applyTemplates("*")
  377. </table>
  378. #end
  379. #match("tr")
  380. <tr>
  381. $context.applyTemplates("*")
  382. </tr>
  383. #end
  384. #match( "td" )
  385. <td bgcolor="$table-td-bg" #*
  386. *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  387. *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  388. *#valign="top" align="left">
  389. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  390. $node.copy( $node.children() )
  391. </font>
  392. </td>
  393. #end
  394. #match( "th" )
  395. <td bgcolor="$table-th-bg" #*
  396. *##ifset($attrib.colspan "colspan=$qq$attrib.colspan$qq ")#*
  397. *##ifset($attrib.rowspan "rowspan=$qq$attrib.rowspan$qq ")#*
  398. *#valign="top" align="left">
  399. <font color="#000000" size="-1" face="arial,helvetica,sanserif">
  400. <b>$node.copy( $node.children())</b>
  401. </font>
  402. </td>
  403. #end
  404. #match("*")
  405. $node.copy()
  406. #end