You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2002/02/20 01:52:21 UTC
cvs commit: jakarta-turbine-maven/xdocs/stylesheets pdf.dvsl site.dvsl
jvanzyl 02/02/19 16:52:21
Added: xdocs project.xml
xdocs/stylesheets pdf.dvsl site.dvsl
Log:
- preparing the documentation system
Revision Changes Path
1.1 jakarta-turbine-maven/xdocs/project.xml
Index: project.xml
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Turbine" href="http://jakarta.apache.org/turbine/turbine-3/">
<title>Turbine 3.x</title>
<logo href="/images/logo.gif">Turbine</logo>
<body>
<menu name="Torque">
<item name="Overview" href="/index.html"/>
<item name="Changes" href="/changes.html"/>
<item name="Testing" href="/core-testing.html"/>
</menu>
</body>
</project>
1.1 jakarta-turbine-maven/xdocs/stylesheets/pdf.dvsl
Index: pdf.dvsl
===================================================================
#document()
<!-- Make a Section header bar -->
#match ( makeSectionHeader $value )
#if ( $value.getAttributeValue("name") )
#set ( $titleName = $value.getAttributeValue("name") )
#else
#set ( $titleName = "" )
#end
<fo:block
font-size="14pt"
font-family="sans-serif"
line-height="24pt"
space-after.optimum="15pt"
background-color="blue"
color="white"
text-align="start"
padding-top="3pt">
$titleName
</fo:block>
#end
<!-- Make a Paragraph -->
#match ( makeParagraph $value )
<fo:block
font-size="12pt"
space-after.optimum="15pt"
font-family="sans-serif"
background-color="white"
color="black"
text-align="start"
padding-top="3pt">
$xmlout.outputString($value)
</fo:block>
#end
<!-- Make a Source Code block -->
#match ( makeSrc $value )
<fo:block
font-size="12pt"
space-after.optimum="15pt"
font-family="sans-serif"
background-color="white"
color="gray"
text-align="start"
padding-top="3pt">
$escape.getText($value.getText())
</fo:block>
#end
<!-- Make an image link -->
#match ( makeLink $value )
<fo:block font-size="12pt"
space-after.optimum="15pt"
font-family="sans-serif"
background-color="white"
color="gray"
text-align="start"
padding-top="3pt">
<fo:basic-link external-destination="http://test">
TO DO
</fo:basic-link>
</fo:block>
#end
#match (document)
<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<fo:simple-page-master
master-name="Velocity"
page-height="8.5in"
page-width="11in"
margin-top="0.25in"
margin-bottom="0.25in"
margin-left="0.5in"
margin-right="0.5in">
<fo:region-before extent="0.25in"/>
<fo:region-body margin-top="0.25in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<!-- starts actual layout -->
<fo:page-sequence master-name="Velocity">
<!-- header -->
<fo:static-content flow-name="xsl-region-before">
<fo:block
text-align="end"
font-size="10pt"
font-family="serif"
color="black"
padding-right="3pt">
$root.getChild("properties").getChild("title").getText() pg <fo:page-number/>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
#set ($allSections = $xpath.applyTo("body/section", $root))
<!-- Walk through the sections -->
#foreach ( $section in $allSections )
#makeSectionHeader($section)
#foreach ( $item in $section.getChildren() )
#if ( $item.getName().equals("p") )
#makeParagraph($item)
#elseif ( $item.getName().equals("source") )
#makeSrc($item)
#end
#end
#end
</fo:flow>
</fo:page-sequence>
</fo:root>
#end
1.1 jakarta-turbine-maven/xdocs/stylesheets/site.dvsl
Index: site.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( "document" )
#set( $project = $node.selectSingleNode("document('xdocs/project.xml')/project" ) )
<html>
<head>
<title>$project.title - $node.properties.title</title>
#foreach( $n in $node.properties.selectNodes("author") )
<meta name="author" value="$n"/>
<meta name="email" value="$n.attribute("email")" />
#end
</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">
$context.applyTemplates("body/section")
</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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>