geirm 02/02/19 20:05:09
Added: xdocs/stylesheets dependencies.dvsl developer-list.dvsl
front-page.dvsl mail-lists.dvsl maven.dvsl
Log:
First cut at a cut-n-render approach to the project descriptor
Revision Changes Path
1.1 jakarta-turbine-maven/xdocs/stylesheets/dependencies.dvsl
Index: dependencies.dvsl
===================================================================
<!--
dependency page generator
version : $Id: dependencies.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
-->
#macro( doBody $document )
<p>
These are the dependencies required by the project :
</p>
<table>
<tr>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
Name</th>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
Type</th>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
Version</th>
</tr>
$context.applyTemplates( $document, "dependencies/dependency" )
</table>
#end
#match( "dependency" )
<tr>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.name.value()</td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.type.value()</td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.version.value()</td>
</tr>
#end
#parse( "xdocs/stylesheets/maven.dvsl" )
1.1 jakarta-turbine-maven/xdocs/stylesheets/developer-list.dvsl
Index: developer-list.dvsl
===================================================================
<!--
developer list page generator
version : $Id: developer-list.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
-->
#macro( doBody $document )
<p>
Here are the developers on the project :
</p>
<table>
<tr>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
Name</th>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
E-Mail</th>
<th bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
Organization</th>
</tr>
$context.applyTemplates( $document, "developers/developer" )
</table>
#end
#match( "developer" )
<tr>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.name.value()</td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<a href="mailto:$node.email.value()">$node.email.value()</a></td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.organization.value()</td>
</tr>
#end
#parse( "xdocs/stylesheets/maven.dvsl" )
1.1 jakarta-turbine-maven/xdocs/stylesheets/front-page.dvsl
Index: front-page.dvsl
===================================================================
<!--
front page generator
version : $Id: front-page.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
-->
#macro( doBody $document )
$context.applyTemplates( $document, "description" )
#end
#parse( "xdocs/stylesheets/maven.dvsl" )
1.1 jakarta-turbine-maven/xdocs/stylesheets/mail-lists.dvsl
Index: mail-lists.dvsl
===================================================================
<!--
mail list page generator
version : $Id: mail-lists.dvsl,v 1.1 2002/02/20 04:05:08 geirm Exp $
-->
#macro( doBody $document )
<p>
Here are the email lists for the project :
</p>
<table>
$context.applyTemplates( $document, "mailingLists/*" )
</table>
#end
#match( "mailingList" )
<tr>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
$node.name.value()</td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<a href="mailto:$node.subscribe.value()">Subscribe</a></td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<a href="mailto:$node.unsubscribe.value()">Unsubscribe</a></td>
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<a href="$node.archive.value()">Archive</a></td>
</tr>
#end
#parse( "xdocs/stylesheets/maven.dvsl" )
1.1 jakarta-turbine-maven/xdocs/stylesheets/maven.dvsl
Index: maven.dvsl
===================================================================
#set( $relative-path = "." )
#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("project")
#set( $project = $node.selectSingleNode("document('xdocs/project.xml')/project" )
)
<html>
<head>
<title>$project.title </title>
</head>
<body bgcolor="$body-bg" text="$body-fg" link="$body-link"
alink="$body-link" vlink="$body-link">
<table border="0" width="100%" cellspacing="4">
## PAGE HEADER
<tr><td colspan="2">
## JAKARTA LOGO
<a href="http://jakarta.apache.org/">
<img src="http://jakarta.apache.org/images/jakarta-logo.gif"
align="left" alt="The Jakarta Project" border="0"/>
</a>
#if( $project.logo )
#set( $alt = $project.logo )
#set( $home = $project.attribute("href") )
#set( $src = $project.logo.attribute( "href" ) )
## PROJECT LOGO
<a href="$home">
<img src="$src" align="right" alt="$alt" border="0"/>
</a>
#end
</td></tr>
## HEADER SEPARATOR
<tr>
<td colspan="2">
<hr noshade="" size="1"/>
</td>
</tr>
<tr>
## LEFT SIDE NAVIGATION
<td width="20%" valign="top" nowrap="true">
$context.applyTemplates( $project, "body/menu" )
</td>
<!-- RIGHT SIDE MAIN BODY -->
<td width="80%" valign="top" align="left">
#doBody( $node )
</td>
</tr>
<!-- FOOTER SEPARATOR -->
<tr>
<td colspan="2">
<hr noshade="" size="1"/>
</td>
</tr>
<!-- PAGE FOOTER -->
<tr><td colspan="2">
<div align="center"><font color="$body-link" size="-1"><em>
Copyright © 1999-2001, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
#end
#*
* Process a menu for the navigation bar
*#
#match( "menu" )
<p>
<strong>$attrib.name</strong>
</p>
<ul>
$context.applyTemplates("item")
</ul>
#end
#*
* Process a menu item for the navigation bar
*#
#match( "item" )
#if( $attrib.href.startsWith("http") )
<li><a href="$attrib.href">$attrib.name</a></li>
#else
<li><a href="${relative-path}$attrib.href">$attrib.name</a></li>
#end
#end
#*
* process a documentation section
*#
#match( "section" )
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="$banner-bg">
<font color="$banner-fg" face="arial,helvetica.sanserif">
<a name="$attrib.name">
<strong>$attrib.name</strong></a></font>
</td></tr>
<tr><td><blockquote>
$context.applyTemplates("*")
</blockquote></td></tr>
</table>
#end
#match( "subsection" )
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<!-- Subsection heading -->
<tr><td bgcolor="$sub-banner-bg">
<font color="$sub-banner-fg" face="arial,helvetica.sanserif">
<a name="$attrib.name">
<strong>$attrib.name</strong></a></font>
</td></tr>
<!-- Subsection body -->
<tr><td><blockquote>
$context.applyTemplates("*")
</blockquote></td></tr>
</table>
#end
#match( "source" )
<div align="left">
<table cellspacing="4" cellpadding="0" border="0">
<tr>
<td bgcolor="$source-color" width="1" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="$source-color" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="$source-color" width="1" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
</tr>
<tr>
<td bgcolor="$source-color" width="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="#ffffff" height="1">
<pre>$toolbox.htmlescape.getText( $node.value() )</pre>
</td>
<td bgcolor="$source-color" width="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
</tr>
<tr>
<td bgcolor="$source-color" width="1" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="$source-color" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
<td bgcolor="$source-color" width="1" height="1">
<img src="/images/void.gif" width="1" height="1" vspace="0" hspace="0"
border="0"/>
</td>
</tr>
</table>
</div>
#end
#match("table")
<table>
$context.applyTemplates("*")
</table>
#end
#match("tr")
<tr>
$context.applyTemplates("*")
</tr>
#end
#match( "td" )
#set ($colspan = $attrib.colspan)
#set ($rowspan = $attrib.rowspan)
<td bgcolor="$table-td-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
$node.copy( $node.children() )
</font>
</td>
#end
#match( "th" )
#set ($colspan = $attrib.colspan )
#set ($rowspan = $attrib.rowspan )
<td bgcolor="$table-th-bg" colspan="$!colspan" rowspan="$!rowspan" valign="top"
align="left">
<font color="#000000" size="-1" face="arial,helvetica,sanserif">
$node.copy( $node.children())
</font>
</td>
#end
#match("*")
$node.copy()
#end
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>