$project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText()

## Defined variables #set ($bodybg = "#ffffff") #set ($bodyfg = "#000000") #set ($bodylink = "#525D76") #set ($titlebg = "#FFFFFF") #set ($titlefg = "#2222AA") ## #set ($bannerbg = "#525D76") #set ($bannerbg = "#FFFFFF") #set ($bannerfg = "#2222AA") #set ($subbannerbg = "#828DA6") #set ($subbannerfg = "#ffffff") #set ($tablethbg = "#039acc") #set ($tabletdbg = "#a0ddf0") #document() ## This is where the macro's live #macro ( table $table)

#foreach ( $items in $table.getChildren() ) #if ($items.getName().equals("tr")) #tr ($items) #end #end

#end #macro ( tr $tr)
#foreach ( $items in $tr.getChildren() ) #if ($items.getName().equals("td")) #td ($items) #elseif ($items.getName().equals("th")) #th ($items) #end #end
#end #macro ( td $value) #if ($value.getAttributeValue("colspan")) #set ($colspan = $value.getAttributeValue("colspan")) #end #if ($value.getAttributeValue("rowspan")) #set ($rowspan = $value.getAttributeValue("rowspan")) #end #if ($value.getText().length() != 0 || $value.hasChildren()) $value.getContent() #else #end #end #macro ( th $value) #if ($value.getAttributeValue("colspan")) #set ($colspan = $value.getAttributeValue("colspan")) #end #if ($value.getAttributeValue("rowspan")) #set ($rowspan = $value.getAttributeValue("rowspan")) #end #if ($value.getText().length() != 0 || $value.hasChildren()) $value.getContent() #else #end #end #macro ( projectanchor $name $value ) #if ($value.startsWith("http://")) $name ## #elseif ($value.startsWith("/site")) ## $name #else $name #end #end #macro ( metaauthor $author $email ) #end #macro ( image $value ) #if ($value.getAttributeValue("width")) #set ($width=$value.getAttributeValue("width")) #end #if ($value.getAttributeValue("height")) #set ($height=$value.getAttributeValue("height")) #end #if ($value.getAttributeValue("align")) #set ($align=$value.getAttributeValue("align")) #end #end #macro ( source $value)

    $escape.getText($value.getText())

#end ## ============================================ ## subsection macro ## ============================================ #macro ( subsection $subsection)

### $subsection.getAttributeValue("name")

#foreach ( $items in $subsection.getChildren() ) #if ($items.getName().equals("img")) #image ($items) #elseif ($items.getName().equals("source")) #source ($items) #elseif ($items.getName().equals("table")) #table ($items) #else $items #end #end #end ## =================================== ## titleSection macro ## =================================== #macro ( titleSection $titleSection) $titleSection.getAttributeValue("name") #end ## ================================ ## section macro ## ================================ #macro ( section $section)

# $section.getAttributeValue("name")

#foreach ( $items in $section.getChildren() ) #if ($items.getName().equals("img")) #image ($items) #elseif ($items.getName().equals("source")) #source ($items) #elseif ($items.getName().equals("table")) #table ($items) #elseif ($items.getName().equals("subsection")) #subsection ($items) #else $items #end #end #end ## =================================== ## make navigation bar ## =================================== #macro ( makeNavigationBar )
#end ## ==================================== ## getProjectImage ## ==================================== #macro (getProjectImage) #if ($project.getChild("logo")) #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) #if ( $logoString.startsWith("/") ) #else #end #else #end #end #macro (printMeta $metaElement) #end #macro (document)
#set ($authors = $root.getChild("properties").getChildren("author")) #foreach ( $au in $authors ) #metaauthor ( $au.getText() $au.getAttributeValue("email") ) #end #set ($metas = $root.getChildren("meta")) ## Parse meta directives such as ## #foreach ($meta in $metas) #printMeta($meta) #end ## Support for tags. #if ($root.getChild("properties").getChild("base")) #set ($url = $root.getChild("properties").getChild("base").getAttributeValue("href")) #end

#getProjectImage()

#foreach ( $item in $root.getChild("body").getChildren() ) #if ($item.getName().equals("img")) #image ($item) #elseif ($item.getName().equals("section")) #section ($item) #elseif ($item.getName().equals("source")) #source ($item) #elseif ($item.getName().equals("table")) #table ($item) #elseif ($item.getName().equals("subsection")) #subsection ($item) #else $item #end #end ## #if ($root.getChild("body").getChild("titleSection")) ## #set ($titleSection = $root.getChild("body").getChild("titleSection")) ## #titleSection($titleSection) ## #end ## ## #set ($allSections = $root.getChild("body").getChildren("section")) ## #foreach ( $section in $allSections ) ## #section ($section) ## #end

#end