## Defined variables
#set ($bodybg = "#ffffff")
#set ($bodyfg = "#000000")
#set ($bodylink = "#525D76")
#set ($bannerbg = "#525D76")
#set ($bannerfg = "#ffffff")
#set ($tablethbg = "#039acc")
#set ($tabletdbg = "#a0ddf0")
#document()
## This is where the macro's live
#macro ( makeProject )
##set ($menus = $project.getChild("body").getChildren("menu"))
#set ($menus = $xpath.applyTo("body/menu", $project))
#foreach ( $menu in $menus )
$menu.getAttributeValue("name")
#foreach ( $item in $menu.getChildren() )
#set ($name = $item.getAttributeValue("name"))
- #projectanchor($name $item.getAttributeValue("href"))
#end
#end
#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 ( projectanchor $name $value )
$name
#end
#macro ( metaauthor $author $email )
#end
#macro (document)
##set ($au = $root.getChild("properties").getChild("author").getText())
##set ($em = $root.getChild("properties").getChild("author").getAttributeValue("email"))
#metaauthor ( $au.getText() $em.getValue() )
$root.getChild("properties").getChild("title").getText()
#makeProject()
|
##set ($allSections = $root.getChild("body").getChildren("section"))
#set ($allSections = $xpath.applyTo("body/section", $root))
#foreach ( $section in $allSections )
#foreach ( $item in $section.getChildren() )
#if ($item.getName().equals("img"))
#image ($item)
#else
$xmlout.outputString($item)
#end
#end
#end
|
#end