diff --git a/proposal/myrmidon/src/xdocs/stylesheets/templates.vm b/proposal/myrmidon/src/xdocs/stylesheets/templates.vm new file mode 100644 index 000000000..55bab4907 --- /dev/null +++ b/proposal/myrmidon/src/xdocs/stylesheets/templates.vm @@ -0,0 +1,196 @@ +## This is where the common 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()) + $xmlout.outputString($value, true) + #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()) + $xmlout.outputString($value, true) + #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 + +#macro ( makeProject ) + #set ($menus = $project.getChild("body").getChildren("menu")) + #foreach ( $menu in $menus ) +

$menu.getAttributeValue("name")

+ + #end +#end + +#macro (getProjectImage) + #if ($project.getChild("logo")) + + + + + #set ( $logoString = $project.getChild("logo").getAttributeValue("href") ) + #if ( $logoString.startsWith("/") ) + $project.getChild( + #else + $project.getChild( + #end + + #else + + + + #end +#end + +#macro (header) + + + + + #set ($authors = $root.getChild("properties").getChildren("author")) + #foreach ( $au in $authors ) + #metaauthor ( $au.getText() $au.getAttributeValue("email") ) + #end + + $project.getChild("title").getText() - $root.getChild("properties").getChild("title").getText() + + + + + + + #getProjectImage() + +
+ + + + + + + + + + + + +
+
+
+ #makeProject() + +#end + +#macro (footer) +
+
+
+
+ Copyright © 2000-2002, Apache Software Foundation +
+
+ + +#end diff --git a/proposal/myrmidon/src/xdocs/velocity.properties b/proposal/myrmidon/src/xdocs/velocity.properties new file mode 100644 index 000000000..06943b256 --- /dev/null +++ b/proposal/myrmidon/src/xdocs/velocity.properties @@ -0,0 +1,2 @@ +file.resource.loader.path=src/xdocs/stylesheets +velocimacro.library=templates.vm