## 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
#if( $subproject.attribute('logo') )
#set( $logo = $subproject.attribute('logo') )
#set( $name = $subproject.attribute('name') )
#set( $home = $subproject.attribute('href') )
#else
#set( $logo = $project.attribute('logo') )
#set( $name = $project.attribute('name') )
#set( $home = $project.attribute('href') )
#end
#if( $logo )
## PROJECT LOGO
#end
## PRINTER FRIENDLY TITLE
#if( $printerFriendly )
$context.applyTemplates("body/section")