$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 ( 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 ( old_source $value )

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

#end #macro ( source $value )

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

#end ## =================================== ## titleSection macro ## =================================== #macro ( titleSection $titleSection) $titleSection.getAttributeValue("name") #end ## ================================ ## section macro ## ================================ #macro ( section $section $level ) #if($section.getAttributeValue("id")) $section.getAttributeValue("name") #else $section.getAttributeValue("name") #end
#foreach ( $item in $section.getChildren() ) #if ($items.getName().equals("img")) #image ($item) #elseif ($item.getName().equals("source")) #source ($item) #elseif ($item.getName().equals("table")) #table ($item) #elseif ($item.getName().equals("section")) #set ($nextLevel = $level + 1) #section ($item $nextLevel ) #set ($nextLevel = $nextLevel - 1) #elseif ($item.getName().equals("sectionMenu")) #set ($nextLevel = $level + 1) #sectionMenu1 ($item $item.getParent() $nextLevel) #set ($nextLevel = $nextLevel - 1) #else $item #end #end
#end ## ================================ ## sectionMenu1 macro ## ================================ #macro ( sectionMenu1 $sectionMenu $section $level ) #if($sectionMenu.getAttributeValue("name")) $sectionMenu.getAttributeValue("name")
#foreach ( $items in $section.getChildren() ) #if ($items.getName().equals("section")) #sectionMenu2 ($items ) #end #end
#else #foreach ( $items in $section.getChildren() ) #if ($items.getName().equals("section")) #sectionMenu2 ($items ) #end #end #end #end ## ================================ ## sectionMenu2 macro ## ================================ #macro ( sectionMenu2 $section ) #if ($section.getAttributeValue("id")) $section.getAttributeValue("name")
#else $section.getAttributeValue("name")
#end
#foreach ( $items in $section.getChildren() ) #if ($items.getName().equals("section")) #sectionMenu2 ($items ) #end #end
#end ## =================================== ## make navigation bar ## =================================== #macro ( makeNavigationBar )
#set ($menus = $project.getChild("body").getChildren("menu")) #foreach ( $menu in $menus )
#foreach ($item in $menu.getChildren() ) #set ($name = $item.getAttributeValue("name"))
#end #end
#end ## ==================================== ## getProjectImage ## ==================================== #macro (getProjectImage) ##
##

| #if ($project.getChild("logo")) #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) #if ( $logoString.startsWith("/") ) #else #end #end

##

#end #macro (printMeta $metaElement) #end #macro (messages $root) #foreach ( $m in $root.getChild("body").getChildren() ) #if ($m.getName().equals("message"))

Message: | $m.getChild("title").getContent()

$m.getChild("explanation").getContent()
#end #end #end #macro (document) #set ($properties = $root.getChild("properties") )
#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 #foreach ( $cssItem in $project.getChildren("css") ) #end #if ($root.getChild("head")) $root.getChild("head").getContent() #end
##

## ##
#getProjectImage() ##
##

##

##

##
## ##
##
## ##
## #foreach ( $item in $root.getChild("body").getChildren() ) #if ($item.getName().equals("img")) #image ($item) #elseif ($item.getName().equals("section")) #section ($item 1) #elseif ($item.getName().equals("source")) #source ($item) #elseif ($item.getName().equals("table")) #table ($item) #elseif ($item.getName().equals("sectionMenu")) #sectionMenu1 ($item $item.getParent() 1) #else $item #end #end ## #if ($root.getChild("body").getChild("titleSection")) ## #set ($titleSection = $root.getChild("body").getChild("titleSection")) ## #titleSection($titleSection) ## #end ## ##
#messages ($root)

##
## ##
##
Copyright © #if($root.getChild("properties").getChild("copyright").getAttributeValue("year")) ${root.getChild("properties").getChild("copyright").getAttributeValue("year")}, #elseif($project.getChild("copyright").getAttributeValue("year")) ${project.getChild("copyright").getAttributeValue("year")}, #else 1999-2006, #end #if($root.getChild("properties").getChild("copyright").getAttributeValue("holder")) ${root.getChild("properties").getChild("copyright").getAttributeValue("holder")} #elseif($project.getChild("copyright").getAttributeValue("holder")) ${project.getChild("copyright").getAttributeValue("holder")} #else Apache Software Foundation #end ##
##

#makeNavigationBar()
#end