##
## DVSL style sheet for velocity-tools project
##
##
## The style sheet looks for the following configuration parameters:
##
## $context.toolbox.basedir
## Its value is expected to be the path to the base directory of
## this documentation set. It can be used to reference other files,
## for example a menu file that is to be loaded.
##
## $context.toolbox.PrinterFriendlyVersion
## If its value is "yes", the generated page has no left-hand menu.
## This facilitates the printing of documentation.
##
## $context.toolbox.LinkToPrinterFriendlyVersion
## If its value is "yes", a link to a printer-friendly version of
## the same document is added to the end of the left-hand menu.
## The file name of the printer-frienly document is derived from the
## the name of the current template in the following way:
## filename.html becomes filename-printer.html
##
##
## Shown below is a configuration example of an ant task:
##
##
##
##
##
##
#set( $body-bg = '#ffffff' )
#set( $body-fg = '#000000' )
#set( $body-link = '#525D76' )
#set( $banner-bg = '#525D76')
#set( $banner-fg = '#ffffff')
#set( $sub-banner-bg = '#828DA6')
#set( $sub-banner-fg = '#ffffff')
#set( $table-th-bg = '#039acc')
#set( $table-td-bg = '#a0ddf0')
#set( $source-color = '#023264')
#match( "document" )
#set( $document = $node )
#if ($context.toolbox.basedir)
#set( $projectfile = "$context.toolbox.basedir/$node.properties.projectfile" )
#else
#set( $projectfile = $node.properties.projectfile )
#end
#set( $project = $node.selectSingleNode("document('$projectfile')/project" ) )
$project.title - $node.properties.title
#foreach( $n in $node.properties.selectNodes("author") )
#end
## PAGE HEADER
## JAKARTA LOGO
#if( $project.logo )
#set( $alt = $project.logo )
#set( $home = $project.attribute("href") )
#set( $src = $project.logo.attribute( "href" ) )
## PROJECT LOGO
#end
|
## HEADER SEPARATOR
|
## LEFT SIDE NAVIGATION
#if ($context.toolbox.PrinterFriendlyVersion.equals("yes"))
|
#else
$context.applyTemplates( $project, "body/toplink" )
$context.applyTemplates( $project, "body/uplink" )
$context.applyTemplates( $project, "body/menu" )
$context.applyTemplates( $project, "body/printerversion" )
|
#end
$context.applyTemplates("body/section")
|
|
Copyright © 1999-2002, Apache Software Foundation
|
#end
#*
* Process a menu for the navigation bar
*#
#match( "menu" )
#if ($attrib.href)
$attrib.name
#else
$attrib.name
#end
$context.applyTemplates()
#end
#*
* Process a submenu for the navigation bar
*#
#match( "submenu" )
#if ($attrib.href)
$attrib.name
#else
$attrib.name
#end
$context.applyTemplates("item")
#end
#*
* Process a menu item for the navigation bar
*#
#match( "item" )
#if ($attrib.href)
$attrib.name
#else
$attrib.name
#end
#end
#*
* Process a link to one layer above in the navigation hierarchy
*#
#match( "uplink" )
$attrib.name
#end
#*
* Insert a link to a printerfriendly version of the document
*#
#match( "printerversion" )
#if ($context.toolbox.LinkToPrinterFriendlyVersion.equals("yes"))
Printer-friendly Version
#end
#end
#*
* process a documentation section
*#
#match( "section" )
#end
#*
* process a documentation subsection
*#
#match( "subsection" )
#end
#*
* process a tool method documentation
*#
#match( "method" )
$context.applyTemplates("*")
#end
#*
* process a one line abstract of a method documentation
*#
#match( "abstract" )
$node.copy()
#end
#*
* process a method signature
*#
#match( "signature" )
#end
#*
* process a list of method parameters
*#
#match( "parameters" )
- Parameters
-
$context.applyTemplates("*")
#end
#*
* process an individual method parameters
*#
#match( "parameter" )
$attrib.name
$node.copy()
#end
#*
* process a 'returns' tag of a method documentation
*#
#match( "returns" )
- Returns
-
$node.copy()
#end
#*
* process a 'see' tag of a method documentation
*#
#match( "see" )
- See Also
-
$node.copy()
#end
#*
* process a 'description' tag of a method documentation
*#
#match( "description" )
$context.applyTemplates("*")
#end
#*
* process a 'toolinfo' block
*#
#match( "toolinfo" )
Class |
| $node.clazz.value() |
Name |
| $node.name.value() (this is the recommended name of the tool in
the Velocity context) |
Toolbox Configuration Example |
| $node.copy($node.config-example.children()) |
Author(s) |
| #foreach($n in $node.selectNodes("author"))$n #end |
#end
#*
* process a 'methods' block. Generates a list of methods.
*#
#match( "methods" )
- Method Overview
-
#foreach ($s in $document.body.selectNodes("section") )
#if ($s.method)
$s.method.attrib("name") |
$s.method.abstract.value()
|
#end
#end
#end
#*
* process a 'sourcecode' block.
*#
#match( "sourcecode" )
#end
#*
* process a 'source' block.
*#
#match( "source" )
#end
#match("table")
$context.applyTemplates("*")
#end
#match("tr")
$context.applyTemplates("*")
#end
#match( "td" )
$node.copy( $node.children() )
|
#end
#match( "th" )
$node.copy( $node.children())
|
#end
#match ( "vel" )
$node.value()
#end
#match("*")
$node.copy()
#end