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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. #set ($pound = "#" )
  14. <!-- start the processing -->
  15. #faqs()
  16. <!-- end the processing -->
  17. ## This is where the FAQ specific macro's live
  18. #macro (toc $section)
  19. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  20. <tr><td bgcolor="$subbannerbg">
  21. <font color="$subbannerfg" face="arial,helvetica,sanserif">
  22. <strong>$section.getAttributeValue("title")</strong>
  23. </font>
  24. </td></tr>
  25. <tr><td>
  26. <blockquote>
  27. <ul>
  28. #foreach ($faq in $section.getChildren("faq") )
  29. #subtoc ($faq)
  30. #end
  31. </ul>
  32. </blockquote>
  33. </td></tr>
  34. </table>
  35. #end
  36. #macro (subtoc $faq)
  37. #set ($id = $faq.getAttributeValue("id"))
  38. <li><a href="$pound$id">
  39. $xmlout.outputString($faq.getChild("question"), true)
  40. </a></li>
  41. #end
  42. #macro (answers $section)
  43. #foreach ($faq in $section.getChildren("faq") )
  44. #faq ($faq)
  45. #end
  46. #end
  47. #macro (faq $faq)
  48. #set ($id = $faq.getAttributeValue("id"))
  49. <a name="$id">
  50. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  51. <tr><td bgcolor="$subbannerbg">
  52. <font color="$subbannerfg" face="arial,helvetica,sanserif">
  53. <strong>
  54. $xmlout.outputString($faq.getChild("question"), true)
  55. </strong>
  56. </font>
  57. </td></tr>
  58. <tr><td>
  59. <blockquote>
  60. #foreach ($item in $faq.getChild("answer").getChildren())
  61. #if ($item.getName().equals("img"))
  62. #image ($item)
  63. #elseif ($item.getName().equals("source"))
  64. #source ($item)
  65. #elseif ($item.getName().equals("table"))
  66. #table ($item)
  67. #else
  68. $xmlout.outputString($item)
  69. #end
  70. #end
  71. </blockquote>
  72. </td></tr>
  73. </table>
  74. </a>
  75. #end
  76. #macro (faqs)
  77. #header()
  78. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  79. <tr><td bgcolor="$bannerbg">
  80. <font color="$bannerfg" face="arial,helvetica,sanserif">
  81. <strong>Questions</strong>
  82. </font>
  83. </td></tr>
  84. <tr><td>
  85. <blockquote>
  86. #set ($allFaqSections = $root.getChildren("faqsection"))
  87. #foreach ( $faqSection in $allFaqSections )
  88. #toc ($faqSection)
  89. #end
  90. </blockquote>
  91. </td></tr>
  92. </table>
  93. <table border="0" cellspacing="0" cellpadding="2" width="100%">
  94. <tr><td bgcolor="$bannerbg">
  95. <font color="$bannerfg" face="arial,helvetica,sanserif">
  96. <strong>Answers</strong>
  97. </font>
  98. </td></tr>
  99. <tr><td>
  100. <blockquote>
  101. #foreach ( $faqSection in $allFaqSections )
  102. #answers ($faqSection)
  103. #end
  104. </blockquote>
  105. </td></tr>
  106. </table>
  107. #footer()
  108. #end