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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. ## Content Stylesheet for Site
  20. ## Defined variables
  21. #set ($lightbg = "#ffffff")
  22. #set ($lightfg = "#ffffff")
  23. #set ($darkfg = "#000000")
  24. #set ($active = "#ffcc00")
  25. #set ($blue4 = "#B2C4E0")
  26. #set ($blue3 = "#294563")
  27. #set ($blue2 = "#4C6C8F")
  28. #set ($blue1 = "#CFDCED")
  29. #set ($sourceborder = "#023264")
  30. #set ($pound = "#" )
  31. #set ($ssi = "include virtual=")
  32. #set ($adsurl = "/ads/buttonbar.html")
  33. ## start the processing
  34. #document()
  35. ## end the processing
  36. ## This is where the common page macro's live
  37. #macro ( isbn $isbn)
  38. <p><b>Available from:</b><br>
  39. <a href="http://www.amazon.com/exec/obidos/tg/detail/-/$!isbn/apachesoftwar-20/" target="_blank">Amazon.com</a>
  40. | <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>
  41. | <a href="http://www.booksense.com/product/info.jsp?affiliateId=Apache&amp;isbn=$!isbn" target="_blank">Book Sense</a>
  42. | <a href="http://www.powells.com/cgi-bin/biblio?isbn=$!isbn&amp;partner_id=29693" target="_blank">Powells.com</a>
  43. <br></p>
  44. #end
  45. #macro ( subsection $subsection)
  46. <h4 class="subsection">
  47. <a name="$escape.getText($subsection.getAttributeValue("name"))"></a>
  48. $subsection.getAttributeValue("name")
  49. </h4>
  50. #foreach ( $items in $subsection.getChildren() )
  51. #if ($items.getName().equals("img"))
  52. #image ($items)
  53. #elseif ($items.getName().equals("source"))
  54. #source ($items)
  55. #elseif ($items.getName().equals("table"))
  56. #table ($items)
  57. #elseif ($items.getName().equals("subsubsection"))
  58. #subsubsection ($items)
  59. #else
  60. $xmlout.outputString($items)
  61. #end
  62. #end
  63. #if ($subsection.getAttributeValue("isbn"))
  64. #set ($isbn = $subsection.getAttributeValue("isbn"))
  65. #isbn ($isbn)
  66. #end
  67. #end
  68. #macro ( subsubsection $subsubsection)
  69. <h5 class="subsection">
  70. <a name="$escape.getText($subsubsection.getAttributeValue("name"))"></a>
  71. *** $subsubsection.getAttributeValue("name") ***
  72. </h5>
  73. #foreach ( $items in $subsubsection.getChildren() )
  74. #if ($items.getName().equals("img"))
  75. #image ($items)
  76. #elseif ($items.getName().equals("source"))
  77. #source ($items)
  78. #elseif ($items.getName().equals("table"))
  79. #table ($items)
  80. #else
  81. $xmlout.outputString($items)
  82. #end
  83. #end
  84. #end
  85. #macro ( section $section)
  86. <h3 class="section">
  87. <a name="$escape.getText($section.getAttributeValue("name"))"></a>
  88. $section.getAttributeValue("name")
  89. </h3>
  90. #foreach ( $items in $section.getChildren() )
  91. #if ($items.getName().equals("img"))
  92. #image ($items)
  93. #elseif ($items.getName().equals("source"))
  94. #source ($items)
  95. #elseif ($items.getName().equals("table"))
  96. #table ($items)
  97. #elseif ($items.getName().equals("subsection"))
  98. #subsection ($items)
  99. #else
  100. $xmlout.outputString($items)
  101. #end
  102. #end
  103. #end
  104. ## This is where the FAQ specific macro's live
  105. #macro (toc $section)
  106. <h4 class="toc">$section.getAttributeValue("title")</h4>
  107. <ul>
  108. #foreach ($faq in $section.getChildren("faq") )
  109. #subtoc ($faq)
  110. #end
  111. </ul>
  112. #end
  113. #macro (subtoc $faq)
  114. #set ($id = $faq.getAttributeValue("id"))
  115. <li><a href="$pound$id">
  116. $xmlout.outputString($faq.getChild("question"), true)
  117. </a></li>
  118. #end
  119. #macro (answers $section)
  120. #foreach ($faq in $section.getChildren("faq") )
  121. #faq ($faq)
  122. #end
  123. #end
  124. #macro (faq $faq)
  125. #set ($id = $faq.getAttributeValue("id"))
  126. <p class="faq">
  127. <a name="$id"></a>
  128. $xmlout.outputString($faq.getChild("question"), true)
  129. </p>
  130. #foreach ($item in $faq.getChild("answer").getChildren())
  131. #if ($item.getName().equals("img"))
  132. #image ($item)
  133. #elseif ($item.getName().equals("source"))
  134. #source ($item)
  135. #elseif ($item.getName().equals("table"))
  136. #table ($item)
  137. #else
  138. $xmlout.outputString($item)
  139. #end
  140. #end
  141. #end
  142. #macro (document)
  143. #header()
  144. <div class="main">
  145. <div class="content">
  146. <h1 class="title">$root.getChild("properties").getChild("title").getText()</h1>
  147. #set ($allSections = $root.getChild("body").getChildren("section"))
  148. #foreach ( $section in $allSections )
  149. #section ($section)
  150. #end
  151. #if ($root.getChildren("faqsection").size() > 0)
  152. #set ($allFaqSections = $root.getChildren("faqsection"))
  153. <h3 class="section">Questions</h3>
  154. #foreach ( $faqSection in $allFaqSections )
  155. #toc ($faqSection)
  156. #end
  157. <h3 class="section">Answers</h3>
  158. #foreach ( $faqSection in $allFaqSections )
  159. #answers ($faqSection)
  160. #end
  161. #end
  162. </div>
  163. </div>
  164. #footer()
  165. #end