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.

site.vsl 7.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. #*
  2. * ============================================================================
  3. * The Apache Software License, Version 1.1
  4. * ============================================================================
  5. *
  6. * Copyright (C) 2000-2003 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. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  51. ## Content Stylesheet for Site
  52. ## Defined variables
  53. #set ($lightbg = "#ffffff")
  54. #set ($lightfg = "#ffffff")
  55. #set ($darkfg = "#000000")
  56. #set ($active = "#ffcc00")
  57. #set ($blue4 = "#B2C4E0")
  58. #set ($blue3 = "#294563")
  59. #set ($blue2 = "#4C6C8F")
  60. #set ($blue1 = "#CFDCED")
  61. #set ($sourceborder = "#023264")
  62. #set ($pound = "#" )
  63. ## start the processing
  64. #document()
  65. ## end the processing
  66. ## This is where the common page macro's live
  67. #macro ( subsection $subsection)
  68. <br/>
  69. <a name="$escape.getText($subsection.getAttributeValue("name"))"></a>
  70. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  71. <tr><td bgcolor="$blue2">
  72. <font color="$lightfg" face="arial,helvetica,sanserif">
  73. <strong>$subsection.getAttributeValue("name")</strong>
  74. </font>
  75. </td></tr>
  76. </table>
  77. #foreach ( $items in $subsection.getChildren() )
  78. #if ($items.getName().equals("img"))
  79. #image ($items)
  80. #elseif ($items.getName().equals("source"))
  81. #source ($items)
  82. #elseif ($items.getName().equals("table"))
  83. #table ($items)
  84. #else
  85. $xmlout.outputString($items)
  86. #end
  87. #end
  88. #end
  89. #macro ( section $section)
  90. <br/>
  91. <table class="nowrap" border="0" cellspacing="0" cellpadding="2" width="100%">
  92. <tr><td bgcolor="$blue3"><font color="$lightfg"><a name="$escape.getText($section.getAttributeValue("name"))"><strong>$section.getAttributeValue("name")</strong></a></font></td></tr>
  93. </table>
  94. #foreach ( $items in $section.getChildren() )
  95. #if ($items.getName().equals("img"))
  96. #image ($items)
  97. #elseif ($items.getName().equals("source"))
  98. #source ($items)
  99. #elseif ($items.getName().equals("table"))
  100. #table ($items)
  101. #elseif ($items.getName().equals("subsection"))
  102. #subsection ($items)
  103. #else
  104. $xmlout.outputString($items)
  105. #end
  106. #end
  107. #end
  108. ## This is where the FAQ specific macro's live
  109. #macro (toc $section)
  110. <br/>
  111. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  112. <tr><td bgcolor="$blue2">
  113. <font color="$lightfg" face="arial,helvetica,sanserif">
  114. <strong>$section.getAttributeValue("title")</strong>
  115. </font>
  116. </td></tr>
  117. </table>
  118. <ul>
  119. #foreach ($faq in $section.getChildren("faq") )
  120. #subtoc ($faq)
  121. #end
  122. </ul>
  123. #end
  124. #macro (subtoc $faq)
  125. #set ($id = $faq.getAttributeValue("id"))
  126. <li><a href="$pound$id">
  127. $xmlout.outputString($faq.getChild("question"), true)
  128. </a></li>
  129. #end
  130. #macro (answers $section)
  131. #foreach ($faq in $section.getChildren("faq") )
  132. #faq ($faq)
  133. #end
  134. #end
  135. #macro (faq $faq)
  136. #set ($id = $faq.getAttributeValue("id"))
  137. <br/>
  138. <a name="$id"></a>
  139. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  140. <tr><td bgcolor="$blue2">
  141. <font color="$lightfg" face="arial,helvetica,sanserif">
  142. <strong>
  143. $xmlout.outputString($faq.getChild("question"), true)
  144. </strong>
  145. </font>
  146. </td></tr>
  147. </table>
  148. #foreach ($item in $faq.getChild("answer").getChildren())
  149. #if ($item.getName().equals("img"))
  150. #image ($item)
  151. #elseif ($item.getName().equals("source"))
  152. #source ($item)
  153. #elseif ($item.getName().equals("table"))
  154. #table ($item)
  155. #else
  156. $xmlout.outputString($item)
  157. #end
  158. #end
  159. #end
  160. #macro (document)
  161. #header()
  162. <table class="title">
  163. <tr>
  164. <td valign="middle">
  165. <h1>$root.getChild("properties").getChild("title").getText()</h1>
  166. </td>
  167. </tr>
  168. </table>
  169. #set ($allSections = $root.getChild("body").getChildren("section"))
  170. #foreach ( $section in $allSections )
  171. #section ($section)
  172. #end
  173. #if ($root.getChildren("faqsection").size() > 0)
  174. #set ($allFaqSections = $root.getChildren("faqsection"))
  175. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  176. <tr><td bgcolor="$blue3">
  177. <font color="$lightfg" face="arial,helvetica,sanserif">
  178. <strong>Questions</strong>
  179. </font>
  180. </td></tr>
  181. </table>
  182. #foreach ( $faqSection in $allFaqSections )
  183. #toc ($faqSection)
  184. #end
  185. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  186. <tr><td bgcolor="$blue3">
  187. <font color="$lightfg" face="arial,helvetica,sanserif">
  188. <strong>Answers</strong>
  189. </font>
  190. </td></tr>
  191. </table>
  192. #foreach ( $faqSection in $allFaqSections )
  193. #answers ($faqSection)
  194. #end
  195. #end
  196. #footer()
  197. #end