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.4 kB

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