| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <!-- Content Stylesheet for Site --> |
| |
| ## Defined variables |
| #set ($bodybg = "#ffffff") |
| #set ($bodyfg = "#000000") |
| #set ($bodylink = "#525D76") |
| #set ($bannerbg = "#525D76") |
| #set ($bannerfg = "#ffffff") |
| #set ($subbannerbg = "#828DA6") |
| #set ($subbannerfg = "#ffffff") |
| #set ($tablethbg = "#039acc") |
| #set ($tabletdbg = "#a0ddf0") |
| #set ($pound = "#" ) |
| |
| <!-- start the processing --> |
| #faqs() |
| <!-- end the processing --> |
| |
| ## This is where the FAQ specific macro's live |
| |
| #macro (toc $section) |
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> |
| <tr><td bgcolor="$subbannerbg"> |
| <font color="$subbannerfg" face="arial,helvetica,sanserif"> |
| <strong>$section.getAttributeValue("title")</strong> |
| </font> |
| </td></tr> |
| <tr><td> |
| <blockquote> |
| <ul> |
| #foreach ($faq in $section.getChildren("faq") ) |
| #subtoc ($faq) |
| #end |
| </ul> |
| </blockquote> |
| </td></tr> |
| </table> |
| #end |
| |
| #macro (subtoc $faq) |
| #set ($id = $faq.getAttributeValue("id")) |
| <li><a href="$pound$id"> |
| $xmlout.outputString($faq.getChild("question"), true) |
| </a></li> |
| #end |
| |
| #macro (answers $section) |
| #foreach ($faq in $section.getChildren("faq") ) |
| #faq ($faq) |
| #end |
| #end |
| |
| #macro (faq $faq) |
| #set ($id = $faq.getAttributeValue("id")) |
| <a name="$id"> |
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> |
| <tr><td bgcolor="$subbannerbg"> |
| <font color="$subbannerfg" face="arial,helvetica,sanserif"> |
| <strong> |
| $xmlout.outputString($faq.getChild("question"), true) |
| </strong> |
| </font> |
| </td></tr> |
| <tr><td> |
| <blockquote> |
| #foreach ($item in $faq.getChild("answer").getChildren()) |
| #if ($item.getName().equals("img")) |
| #image ($item) |
| #elseif ($item.getName().equals("source")) |
| #source ($item) |
| #elseif ($item.getName().equals("table")) |
| #table ($item) |
| #else |
| $xmlout.outputString($item) |
| #end |
| #end |
| </blockquote> |
| </td></tr> |
| </table> |
| </a> |
| #end |
| |
| #macro (faqs) |
| #header() |
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> |
| <tr><td bgcolor="$bannerbg"> |
| <font color="$bannerfg" face="arial,helvetica,sanserif"> |
| <strong>Questions</strong> |
| </font> |
| </td></tr> |
| <tr><td> |
| <blockquote> |
| #set ($allFaqSections = $root.getChildren("faqsection")) |
| #foreach ( $faqSection in $allFaqSections ) |
| #toc ($faqSection) |
| #end |
| </blockquote> |
| </td></tr> |
| </table> |
| |
| <table border="0" cellspacing="0" cellpadding="2" width="100%"> |
| <tr><td bgcolor="$bannerbg"> |
| <font color="$bannerfg" face="arial,helvetica,sanserif"> |
| <strong>Answers</strong> |
| </font> |
| </td></tr> |
| <tr><td> |
| <blockquote> |
| #foreach ( $faqSection in $allFaqSections ) |
| #answers ($faqSection) |
| #end |
| </blockquote> |
| </td></tr> |
| </table> |
| #footer() |
| #end |