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 6.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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. <h4 class="subsection">
  69. <a name="$escape.getText($subsection.getAttributeValue("name"))"></a>
  70. $subsection.getAttributeValue("name")
  71. </h4>
  72. #foreach ( $items in $subsection.getChildren() )
  73. #if ($items.getName().equals("img"))
  74. #image ($items)
  75. #elseif ($items.getName().equals("source"))
  76. #source ($items)
  77. #elseif ($items.getName().equals("table"))
  78. #table ($items)
  79. #else
  80. $xmlout.outputString($items)
  81. #end
  82. #end
  83. #end
  84. #macro ( section $section)
  85. <h3 class="section">
  86. <a name="$escape.getText($section.getAttributeValue("name"))"></a>
  87. $section.getAttributeValue("name")
  88. </h3>
  89. #foreach ( $items in $section.getChildren() )
  90. #if ($items.getName().equals("img"))
  91. #image ($items)
  92. #elseif ($items.getName().equals("source"))
  93. #source ($items)
  94. #elseif ($items.getName().equals("table"))
  95. #table ($items)
  96. #elseif ($items.getName().equals("subsection"))
  97. #subsection ($items)
  98. #else
  99. $xmlout.outputString($items)
  100. #end
  101. #end
  102. #end
  103. ## This is where the FAQ specific macro's live
  104. #macro (toc $section)
  105. <h4 class="toc">$section.getAttributeValue("title")</h4>
  106. <ul>
  107. #foreach ($faq in $section.getChildren("faq") )
  108. #subtoc ($faq)
  109. #end
  110. </ul>
  111. #end
  112. #macro (subtoc $faq)
  113. #set ($id = $faq.getAttributeValue("id"))
  114. <li><a href="$pound$id">
  115. $xmlout.outputString($faq.getChild("question"), true)
  116. </a></li>
  117. #end
  118. #macro (answers $section)
  119. #foreach ($faq in $section.getChildren("faq") )
  120. #faq ($faq)
  121. #end
  122. #end
  123. #macro (faq $faq)
  124. #set ($id = $faq.getAttributeValue("id"))
  125. <p class="faq">
  126. <a name="$id"></a>
  127. $xmlout.outputString($faq.getChild("question"), true)
  128. </p>
  129. #foreach ($item in $faq.getChild("answer").getChildren())
  130. #if ($item.getName().equals("img"))
  131. #image ($item)
  132. #elseif ($item.getName().equals("source"))
  133. #source ($item)
  134. #elseif ($item.getName().equals("table"))
  135. #table ($item)
  136. #else
  137. $xmlout.outputString($item)
  138. #end
  139. #end
  140. #end
  141. #macro (document)
  142. #header()
  143. <div class="main">
  144. <div class="content">
  145. <h1 class="title">$root.getChild("properties").getChild("title").getText()</h1>
  146. #set ($allSections = $root.getChild("body").getChildren("section"))
  147. #foreach ( $section in $allSections )
  148. #section ($section)
  149. #end
  150. #if ($root.getChildren("faqsection").size() > 0)
  151. #set ($allFaqSections = $root.getChildren("faqsection"))
  152. <h3 class="section">Questions</h3>
  153. #foreach ( $faqSection in $allFaqSections )
  154. #toc ($faqSection)
  155. #end
  156. <h3 class="section">Answers</h3>
  157. #foreach ( $faqSection in $allFaqSections )
  158. #answers ($faqSection)
  159. #end
  160. #end
  161. </div>
  162. </div>
  163. #footer()
  164. #end