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.

faq.vsl 3.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- Content Stylesheet for Site -->
  3. ## Defined variables
  4. #set ($bodybg = "#ffffff")
  5. #set ($bodyfg = "#000000")
  6. #set ($bodylink = "#525D76")
  7. #set ($bannerbg = "#525D76")
  8. #set ($bannerfg = "#ffffff")
  9. #set ($subbannerbg = "#828DA6")
  10. #set ($subbannerfg = "#ffffff")
  11. #set ($tablethbg = "#039acc")
  12. #set ($tabletdbg = "#a0ddf0")
  13. <!-- start the processing -->
  14. #faqs()
  15. <!-- end the processing -->
  16. ## This is where the FAQ specific macro's live
  17. #macro (toc $section)
  18. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  19. <tr><td bgcolor="$subbannerbg">
  20. <font color="$subbannerfg" face="arial,helvetica,sanserif">
  21. <strong>$section.getAttributeValue("title")</strong>
  22. </font>
  23. </td></tr>
  24. <tr><td>
  25. <blockquote>
  26. <ul>
  27. #foreach ($faq in $section.getChildren("faq") )
  28. #subtoc ($faq)
  29. #end
  30. </ul>
  31. </blockquote>
  32. </td></tr>
  33. </table>
  34. #end
  35. #macro (subtoc $faq)
  36. #set ($id = $faq.getAttributeValue("id"))
  37. <li><a href="$id">
  38. $xmlout.outputString($faq.getChild("question"))
  39. </a></li>
  40. #end
  41. #macro (answers $section)
  42. #foreach ($faq in $section.getChildren("faq") )
  43. #faq ($faq)
  44. #end
  45. #end
  46. #macro (faq $faq)
  47. #set ($id = $faq.getAttributeValue("id"))
  48. <a name="$id">
  49. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  50. <tr><td bgcolor="$subbannerbg">
  51. <font color="$subbannerfg" face="arial,helvetica,sanserif">
  52. <strong>
  53. $xmlout.outputString($faq.getChild("question"))
  54. </strong>
  55. </font>
  56. </td></tr>
  57. <tr><td>
  58. <blockquote>
  59. #foreach ($item in $faq.getChild("answer").getChildren())
  60. #if ($item.getName().equals("img"))
  61. #image ($item)
  62. #elseif ($item.getName().equals("source"))
  63. #source ($item)
  64. #elseif ($item.getName().equals("table"))
  65. #table ($item)
  66. #else
  67. $xmlout.outputString($item)
  68. #end
  69. #end
  70. </blockquote>
  71. </td></tr>
  72. </table>
  73. </a>
  74. #end
  75. #macro (faqs)
  76. #header()
  77. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  78. <tr><td bgcolor="$bannerbg">
  79. <font color="$bannerfg" face="arial,helvetica,sanserif">
  80. <strong>Questions</strong>
  81. </font>
  82. </td></tr>
  83. <tr><td>
  84. <blockquote>
  85. #set ($allFaqSections = $root.getChildren("faqsection"))
  86. #foreach ( $faqSection in $allFaqSections )
  87. #toc ($faqSection)
  88. #end
  89. </blockquote>
  90. </td></tr>
  91. </table>
  92. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  93. <tr><td bgcolor="$bannerbg">
  94. <font color="$bannerfg" face="arial,helvetica,sanserif">
  95. <strong>Answers</strong>
  96. </font>
  97. </td></tr>
  98. <tr><td>
  99. <blockquote>
  100. #foreach ( $faqSection in $allFaqSections )
  101. #answers ($faqSection)
  102. #end
  103. </blockquote>
  104. </td></tr>
  105. </table>
  106. #footer()
  107. #end