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

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