#parse ( "templates.vm" )
#macro(document)
#header()
#set($allSections = $root.getChild("body").getChildren("section"))
#foreach( $section in $allSections )
#section ($section)
#end
#footer()
#end
#macro ( subsection $subsection)
#if ( $section.getAttributeValue("anchor") )
#set ($anchor = $section.getAttributeValue("anchor"))
#else
#set ($anchor = $section.getAttributeValue("name"))
#end
#foreach ( $items in $section.getChildren() )
#if ($items.getName().equals("subsection"))
#subsection ($items)
#else
#copy($items)
#end
#end
#end
#parse ( "templates.vm" )
#document()