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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #*
  2. * Licensed to the Apache Software Foundation (ASF) under one or more
  3. * contributor license agreements. See the NOTICE file distributed with
  4. * this work for additional information regarding copyright ownership.
  5. * The ASF licenses this file to You under the Apache License, Version 2.0
  6. * (the "License"); you may not use this file except in compliance with
  7. * the License. You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. *#
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  19. <!--
  20. Licensed to the Apache Software Foundation (ASF) under one or more
  21. contributor license agreements. See the NOTICE file distributed with
  22. this work for additional information regarding copyright ownership.
  23. The ASF licenses this file to You under the Apache License, Version 2.0
  24. (the "License"); you may not use this file except in compliance with
  25. the License. You may obtain a copy of the License at
  26. http://www.apache.org/licenses/LICENSE-2.0
  27. Unless required by applicable law or agreed to in writing, software
  28. distributed under the License is distributed on an "AS IS" BASIS,
  29. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  30. See the License for the specific language governing permissions and
  31. limitations under the License.
  32. -->
  33. ## Content Stylesheet for Site
  34. ## Defined variables
  35. #set ($lightbg = "#ffffff")
  36. #set ($lightfg = "#ffffff")
  37. #set ($darkfg = "#000000")
  38. #set ($active = "#ffcc00")
  39. #set ($blue4 = "#B2C4E0")
  40. #set ($blue3 = "#294563")
  41. #set ($blue2 = "#4C6C8F")
  42. #set ($blue1 = "#CFDCED")
  43. #set ($sourceborder = "#023264")
  44. #set ($pound = "#" )
  45. #set ($ssi = "include virtual=")
  46. #set ($adsurl = "/ads/buttonbar.html")
  47. ## start the processing
  48. #document()
  49. ## end the processing
  50. ## This is where the common page macro's live
  51. #macro ( isbn $isbn)
  52. <p><b>Available from:</b><br>
  53. <a href="http://www.amazon.com/exec/obidos/tg/detail/-/$!isbn/apachesoftwar-20/" target="_blank">Amazon.com</a>
  54. | <a href="http://service.bfast.com/bfast/click?bfmid=2181&amp;bfmtype=book&amp;sourceid=41462544&amp;bfpid=$!isbn" target="_blank">Barnes &amp; Noble</a>
  55. | <a href="http://www.booksense.com/product/info.jsp?affiliateId=Apache&amp;isbn=$!isbn" target="_blank">Book Sense</a>
  56. | <a href="http://www.powells.com/cgi-bin/biblio?isbn=$!isbn&amp;partner_id=29693" target="_blank">Powells.com</a>
  57. <br></p>
  58. #end
  59. #macro ( subsection $subsection)
  60. <h4 class="subsection">
  61. <a name="$escape.getText($subsection.getAttributeValue("name"))"></a>
  62. $subsection.getAttributeValue("name")
  63. </h4>
  64. #foreach ( $items in $subsection.getChildren() )
  65. #if ($items.getName().equals("img"))
  66. #image ($items)
  67. #elseif ($items.getName().equals("source"))
  68. #source ($items)
  69. #elseif ($items.getName().equals("table"))
  70. #table ($items)
  71. #elseif ($items.getName().equals("subsubsection"))
  72. #subsubsection ($items)
  73. #else
  74. $xmlout.outputString($items)
  75. #end
  76. #end
  77. #if ($subsection.getAttributeValue("isbn"))
  78. #set ($isbn = $subsection.getAttributeValue("isbn"))
  79. #isbn ($isbn)
  80. #end
  81. #end
  82. #macro ( subsubsection $subsubsection)
  83. <h5 class="subsection">
  84. <a name="$escape.getText($subsubsection.getAttributeValue("name"))"></a>
  85. *** $subsubsection.getAttributeValue("name") ***
  86. </h5>
  87. #foreach ( $items in $subsubsection.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. #else
  95. $xmlout.outputString($items)
  96. #end
  97. #end
  98. #end
  99. #macro ( section $section)
  100. <h3 class="section">
  101. <a name="$escape.getText($section.getAttributeValue("name"))"></a>
  102. $section.getAttributeValue("name")
  103. </h3>
  104. #foreach ( $items in $section.getChildren() )
  105. #if ($items.getName().equals("img"))
  106. #image ($items)
  107. #elseif ($items.getName().equals("source"))
  108. #source ($items)
  109. #elseif ($items.getName().equals("table"))
  110. #table ($items)
  111. #elseif ($items.getName().equals("subsection"))
  112. #subsection ($items)
  113. #else
  114. $xmlout.outputString($items)
  115. #end
  116. #end
  117. #end
  118. ## This is where the FAQ specific macro's live
  119. #macro (toc $section)
  120. <h4 class="toc">$section.getAttributeValue("title")</h4>
  121. <ul>
  122. #foreach ($faq in $section.getChildren("faq") )
  123. #subtoc ($faq)
  124. #end
  125. </ul>
  126. #end
  127. #macro (subtoc $faq)
  128. #set ($id = $faq.getAttributeValue("id"))
  129. <li><a href="$pound$id">
  130. $xmlout.outputString($faq.getChild("question"), true)
  131. </a></li>
  132. #end
  133. #macro (answers $section)
  134. #foreach ($faq in $section.getChildren("faq") )
  135. #faq ($faq)
  136. #end
  137. #end
  138. #macro (faq $faq)
  139. #set ($id = $faq.getAttributeValue("id"))
  140. <p class="faq">
  141. <a name="$id"></a>
  142. $xmlout.outputString($faq.getChild("question"), true)
  143. </p>
  144. #foreach ($item in $faq.getChild("answer").getChildren())
  145. #if ($item.getName().equals("img"))
  146. #image ($item)
  147. #elseif ($item.getName().equals("source"))
  148. #source ($item)
  149. #elseif ($item.getName().equals("table"))
  150. #table ($item)
  151. #else
  152. $xmlout.outputString($item)
  153. #end
  154. #end
  155. #end
  156. #macro (document)
  157. #header()
  158. <div class="main">
  159. <div class="content">
  160. <h1 class="title">$root.getChild("properties").getChild("title").getText()</h1>
  161. #set ($allSections = $root.getChild("body").getChildren("section"))
  162. #foreach ( $section in $allSections )
  163. #section ($section)
  164. #end
  165. #if ($root.getChildren("faqsection").size() > 0)
  166. #set ($allFaqSections = $root.getChildren("faqsection"))
  167. <h3 class="section">Questions</h3>
  168. #foreach ( $faqSection in $allFaqSections )
  169. #toc ($faqSection)
  170. #end
  171. <h3 class="section">Answers</h3>
  172. #foreach ( $faqSection in $allFaqSections )
  173. #answers ($faqSection)
  174. #end
  175. #end
  176. </div>
  177. </div>
  178. #footer()
  179. #end