#makeProject()
|
#end
#macro (footer)
#getAuthorList()
|
#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
#macro ( table $table)
#set ($rowcount = 1)
#end
#end
#macro ( td $value)
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
|
#end
#macro ( th $value)
#if ($value.getText().length() != 0 || $value.hasChildren())
#copycontent($value)
#else
#end
|
#end
#macro ( anchor $name $value )
#if ($value.startsWith("http://"))
$name
#elseif ($value.startsWith("/site"))
$name
#elseif ( $value.startsWith("/") )
$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.text.trim() )
#end
#macro ( makeProject )
#set ($menus = $project.getChild("body").getChildren("menu"))
#foreach ( $menu in $menus )
$menu.getAttributeValue("name")
#foreach ( $item in $menu.getChildren() )
#set ($name = $item.getAttributeValue("name"))
#anchor($name $item.getAttributeValue("href"))
#end
#end
#end
#macro (getProjectImage)
#if ($project.getChild("logo"))
|
#set ( $logoString = $project.getChild("logo").getAttributeValue("href") )
#if ( $logoString.startsWith("/") )
#else
#end
|
#else
|
#end
#end
#macro (copy $element)
#if ( $element.name == "a" )
#anchor ( $element.content $element.getAttributeValue( "href" ) )
#elseif ( $element.name == "img" )
#image ($element)
#elseif ( $element.name == "source" )
#source ($element)
#elseif ( $element.name == "table" )
#table ($element)
#elseif ( $element.name == "pre" )
$element.content
#elseif ( $element.name == "escaped" )
$element.text
#else
<$element.name
#foreach ( $attr in $element.attributes )
$attr.name="$attr.value"
#end
>#copycontent($element)$element.name>
#end
#end
#macro (getAuthorList)
#set ($authors = $root.getChild("properties").getChildren("author"))
#foreach ( $au in $authors )
#if( $velocityCount == 1 )by #end
#if( $velocityCount != 1 ),#end
$au.getText()
#end
#end
#macro (copycontent $element)
#if ( $element.children.size() > 0 )
#foreach ( $child in $element.content )
#if ( $child.class.name.endsWith( "Element" ) )
#copy( $child )
#else
$escape.getText( $child.getText() )
#end
#end
#else
$element.content
#end
#end
#macro(document)
#header()
#set($allSections = $root.getChild("body").getChildren("section"))
#foreach( $section in $allSections )
#section ($section)
#end
#footer()
#end
#macro ( subsection $subsection)
#if ( $subsection.getAttributeValue("anchor") )
#set ($anchor = $subsection.getAttributeValue("anchor"))
#else
#set ($anchor = $subsection.getAttributeValue("name"))
#end
#foreach ( $items in $subsection.getChildren() )
#copy($items)
#end
#end
#macro (section $section)
#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
#macro (change $action)
$action.getText() ($action.getAttributeValue("dev"))
#end
#macro (changeset $release)
Revision $release.getAttributeValue("version") ($release.getAttributeValue("date"))
|
#foreach ($action in $release.getChildren("action"))
- #change ($action)
#end
|
#end
#macro (changes)
#header()
ChangeLog
|
#set ($releases = $root.getChildren("release"))
#foreach ( $release in $releases )
#changeset ($release)
#end
|
#footer()
#end