## Licensed to the Apache Software Foundation (ASF) under one ## or more contributor license agreements. See the NOTICE file ## distributed with this work for additional information ## regarding copyright ownership. The ASF licenses this file ## to you under the Apache License, Version 2.0 (the ## "License"); you may not use this file except in compliance ## with the License. You may obtain a copy of the License at ## ## http://www.apache.org/licenses/LICENSE-2.0 ## ## Unless required by applicable law or agreed to in writing, ## software distributed under the License is distributed on an ## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ## KIND, either express or implied. See the License for the ## specific language governing permissions and limitations ## under the License. ## 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. ## ## Shown below is a configuration example of an ant task: ## ## ## ## ## ## #match( "document" ) ## identify if this is to be a printer-friendly version #set( $printerFriendly = $context.toolbox.PrinterFriendlyVersion.equals('yes') ) ## alias the current node #set( $document = $node ) ## get path to the project file #if ($context.toolbox.basedir) #set( $projectfile = "$context.toolbox.basedir/$node.properties.projectfile" ) #else #set( $projectfile = $node.properties.projectfile ) #end ## get actual project node #set( $project = $node.selectSingleNode("document('$projectfile')/project" ) ) ## check for a subproject file #if( $node.properties.subprojectfile ) #set( $subprojectfile = $node.properties.subprojectfile ) #set( $subproject = $node.selectSingleNode("document('$subprojectfile')/project") ) #set( $subtitle = $subproject.attribute('name') ) #end #set( $pagetitle = $document.properties.title ) ## build up crumbs if they'll be needed #if( !$printerFriendly ) #set( $crumbs = $project.selectNodes('breadcrumb') ) #set( $subcrumbs = $subproject.selectNodes('breadcrumb') ) #if( $subcrumbs && !$subcrumbs.empty ) #set( $foo = $crumbs.addAll($subcrumbs) ) #end #end $project.attribute('name')#if( $subtitle ) - $subtitle#end#if( $pagetitle ) - $pagetitle#end #foreach( $n in $node.properties.selectNodes("author") ) #if( $n.attribute('email') ) #end #end ## PAGE HEADER (LOGOS) ## PRINTER FRIENDLY TITLE #if( $printerFriendly )

#if( $subtitle )$subtitle - #end#if( $pagetitle )$pagetitle#end


#end ## BREADCRUMB LINKS #if( !$printerFriendly ) #end #if( !$printerFriendly )
#end
$context.applyTemplates("body/section")


#end #* * Process a menu for the navigation bar *# #match( "group" ) #if ($attrib.href)
$attrib.name
#else
$attrib.name
#end #end #* * Process a submenu for the navigation bar *# #match( "subGroup" ) #if ($attrib.href)
  • $attrib.name #else
  • $attrib.name #end
  • #end #* * Process a menu item for the navigation bar *# #match( "item" ) #if ($attrib.href)
  • $attrib.name
  • #else
  • $attrib.name
  • #end #end #* * Insert a link to a printerfriendly version of the document *# #match( "printerversion" ) #set( $filename = $context.getAppValue('infilename') ) #set( $filename = $filename.substring(0, $filename.lastIndexOf('.')) ) #end #* * process a documentation section *# #match( "section" ) ##
    ## #if( $attrib.href )

    $attrib.name

    #else

    $attrib.name

    #end $context.applyTemplates("*")
    #end #* * process a documentation subsection *# #match( "subsection" ) ##
    ## #if( $attrib.href )

    $attrib.name

    #else

    $attrib.name

    #end $context.applyTemplates("*")
    #end #* * process a 'sourcecode' block. *# #match( "sourcecode" )
    $node.copy()
    #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("*") $node.copy() #end