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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. <!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 ($blue3 = "#294563")
  58. #set ($blue2 = "#4C6C8F")
  59. #set ($blue1 = "#CFDCED")
  60. #set ($sourceborder = "#023264")
  61. #set ($pound = "#" )
  62. ## start the processing
  63. #document()
  64. ## end the processing
  65. ## This is where the common page macro's live
  66. #macro ( subsection $subsection)
  67. <p>
  68. <a name="$escape.getText($subsection.getAttributeValue("name"))">
  69. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  70. <tr><td bgcolor="$blue2">
  71. <font color="$lightfg" face="arial,helvetica,sanserif">
  72. <strong>$subsection.getAttributeValue("name")</strong>
  73. </strong>
  74. </font>
  75. </td></tr>
  76. </table>
  77. </a>
  78. #foreach ( $items in $subsection.getChildren() )
  79. #if ($items.getName().equals("img"))
  80. #image ($items)
  81. #elseif ($items.getName().equals("source"))
  82. #source ($items)
  83. #elseif ($items.getName().equals("table"))
  84. #table ($items)
  85. #else
  86. $xmlout.outputString($items)
  87. #end
  88. #end
  89. </p>
  90. #end
  91. #macro ( section $section)
  92. <p>
  93. <table nowrap border="0" cellspacing="0" cellpadding="2" width="100%">
  94. <tr><td bgcolor="$blue3"><font color="$lightfg"><a name="$escape.getText($section.getAttributeValue("name"))"><strong>$section.getAttributeValue("name")</strong></a></font></td></tr>
  95. </table>
  96. #foreach ( $items in $section.getChildren() )
  97. #if ($items.getName().equals("img"))
  98. #image ($items)
  99. #elseif ($items.getName().equals("source"))
  100. #source ($items)
  101. #elseif ($items.getName().equals("table"))
  102. #table ($items)
  103. #elseif ($items.getName().equals("subsection"))
  104. #subsection ($items)
  105. #else
  106. $xmlout.outputString($items)
  107. #end
  108. #end
  109. </p>
  110. #end
  111. ## This is where the FAQ specific macro's live
  112. #macro (toc $section)
  113. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  114. <tr><td bgcolor="$blue2">
  115. <font color="$lightfg" face="arial,helvetica,sanserif">
  116. <strong>$section.getAttributeValue("title")</strong>
  117. </font>
  118. </td></tr>
  119. </table>
  120. <p>
  121. <ul>
  122. #foreach ($faq in $section.getChildren("faq") )
  123. #subtoc ($faq)
  124. #end
  125. </ul>
  126. </p>
  127. #end
  128. #macro (subtoc $faq)
  129. #set ($id = $faq.getAttributeValue("id"))
  130. <li><a href="$pound$id">
  131. $xmlout.outputString($faq.getChild("question"), true)
  132. </a></li>
  133. #end
  134. #macro (answers $section)
  135. #foreach ($faq in $section.getChildren("faq") )
  136. #faq ($faq)
  137. #end
  138. #end
  139. #macro (faq $faq)
  140. #set ($id = $faq.getAttributeValue("id"))
  141. <a name="$id">
  142. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  143. <tr><td bgcolor="$blue2">
  144. <font color="$lightfg" face="arial,helvetica,sanserif">
  145. <strong>
  146. $xmlout.outputString($faq.getChild("question"), true)
  147. </strong>
  148. </font>
  149. </td></tr>
  150. </table>
  151. <p>
  152. #foreach ($item in $faq.getChild("answer").getChildren())
  153. #if ($item.getName().equals("img"))
  154. #image ($item)
  155. #elseif ($item.getName().equals("source"))
  156. #source ($item)
  157. #elseif ($item.getName().equals("table"))
  158. #table ($item)
  159. #else
  160. $xmlout.outputString($item)
  161. #end
  162. #end
  163. </p>
  164. </a>
  165. #end
  166. #macro (document)
  167. #header()
  168. <table class="title">
  169. <tr>
  170. <td valign="middle">
  171. <h1>$root.getChild("properties").getChild("title").getText()</h1>
  172. </td>
  173. </tr>
  174. </table>
  175. #set ($allSections = $root.getChild("body").getChildren("section"))
  176. #foreach ( $section in $allSections )
  177. #section ($section)
  178. #end
  179. #if ($root.getChildren("faqsection").size() > 0)
  180. #set ($allFaqSections = $root.getChildren("faqsection"))
  181. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  182. <tr><td bgcolor="$blue3">
  183. <font color="$lightfg" face="arial,helvetica,sanserif">
  184. <strong>Questions</strong>
  185. </font>
  186. </td></tr>
  187. </table>
  188. <p>
  189. #foreach ( $faqSection in $allFaqSections )
  190. #toc ($faqSection)
  191. #end
  192. </p>
  193. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  194. <tr><td bgcolor="$blue3">
  195. <font color="$lightfg" face="arial,helvetica,sanserif">
  196. <strong>Answers</strong>
  197. </font>
  198. </td></tr>
  199. </table>
  200. <p>
  201. #foreach ( $faqSection in $allFaqSections )
  202. #answers ($faqSection)
  203. #end
  204. </p>
  205. #end
  206. #footer()
  207. #end