You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ni...@apache.org on 2002/05/30 18:25:03 UTC
cvs commit: jakarta-avalon/src/documentation/skins/jakarta-site/xslt/html book2menu.xsl document2html.xsl site2xhtml.xsl
nicolaken 02/05/30 09:25:03
Added: src/documentation/skins/jakarta-site/xslt/html book2menu.xsl
document2html.xsl site2xhtml.xsl
Log:
Updating docs generation to Cocoon 2.0.3 used in Centipede;
cleaning the structure related to documentation.
Revision Changes Path
1.1 jakarta-avalon/src/documentation/skins/jakarta-site/xslt/html/book2menu.xsl
Index: book2menu.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="book">
<menu>
<xsl:apply-templates/>
</menu>
</xsl:template>
<xsl:template match="project">
<br/><a href="{@href}"><font color="#F3510C" size="+1"><xsl:value-of select="@label"/></font></a><br/>
</xsl:template>
<xsl:template match="menu">
<br/>
<span class="s1"><xsl:value-of select="@label"/></span><br/>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="menu-item">
<xsl:if test="not(@type) or @type!='hidden'">
<a href="{@href}" class="s1"><xsl:value-of select="@label"/></a><br/>
</xsl:if>
</xsl:template>
<xsl:template match="node()|@*" priority="-1"/>
</xsl:stylesheet>
1.1 jakarta-avalon/src/documentation/skins/jakarta-site/xslt/html/document2html.xsl
Index: document2html.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="document">
<body>
<xsl:if test="normalize-space(header/title)!=''">
<title><xsl:value-of select="header/title"/></title>
<table class="centered" align="center" width="100%">
<tbody>
<tr>
<td align="center">
<table class="title" cellspacing="0" cellpadding="1" border="0">
<tbody>
<tr>
<td bgcolor="#525d76">
<table class="centered" cellspacing="0" cellpadding="2" border="0" width="100%">
<tbody>
<tr>
<td bgcolor="#f3dd61">
<span class="title"><xsl:value-of select="header/title"/>
<xsl:if test="header/subtitle">
 - <i><xsl:value-of select="header/subtitle"/></i>
</xsl:if>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</xsl:if>
<font color="#000000" size="-2">
<p>
<xsl:for-each select="header/person">
<xsl:choose>
<xsl:when test="position()=1">by</xsl:when>
<xsl:otherwise>, </xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<a href="mailto:{@email}">
<xsl:value-of select="@name"/>
</a>
</p>
</font>
<xsl:apply-templates select="body"/>
</body>
</xsl:template>
<xsl:template match="changes"/>
<xsl:template match="action"/>
<xsl:template match="body">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="section">
<xsl:call-template name="dosection">
<xsl:with-param name="level"><xsl:value-of select="count(ancestor::section)+1"/></xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="dosection">
<xsl:param name="level"/>
<div align="right">
<table border="0" cellpadding="2" cellspacing="0">
<xsl:attribute name="width"><xsl:value-of select="number(100)-(1*(number($level)-1))"/>%</xsl:attribute>
<tr>
<td bgcolor="#525D76">
<font color="#ffffff">
<xsl:attribute name="size">
<xsl:choose>
<xsl:when test="number($level)=1">+1</xsl:when>
<xsl:when test="number($level)=2">+0</xsl:when>
<xsl:otherwise>-<xsl:value-of select="number($level)-2"/></xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<font face="Arial,sans-serif"><b><xsl:value-of select="@title"/></b></font>
</font>
</td>
</tr>
<tr>
<td>
<br/>
<xsl:apply-templates>
<xsl:with-param name="level" select="number($level)+1"/>
</xsl:apply-templates>
</td>
</tr>
</table>
</div><br/>
</xsl:template>
<xsl:template match="s1">
<xsl:call-template name="dosection">
<xsl:with-param name="level">1</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="s2">
<xsl:call-template name="dosection">
<xsl:with-param name="level">2</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="s3">
<xsl:call-template name="dosection">
<xsl:with-param name="level">3</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="s4">
<xsl:call-template name="dosection">
<xsl:with-param name="level">4</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="br">
<br/>
</xsl:template>
<xsl:template match="strong|em">
<em><xsl:apply-templates/></em>
</xsl:template>
<xsl:template match="ul">
<ul><xsl:apply-templates/></ul>
</xsl:template>
<xsl:template match="li">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="ol">
<ol><xsl:apply-templates/></ol>
</xsl:template>
<xsl:template match="link">
<a href="{@href}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="figure">
<xsl:choose>
<xsl:when test="@src">
<div align="center">
<table border="0" cellpadding="2" cellspacing="2">
<tr>
<td bgcolor="#525D76"><font color="#ffffff" size="0"><xsl:value-of select="@alt"/></font></td>
</tr>
<tr>
<td><img border="0" alt="{@alt}" src="{@src}"/></td>
</tr>
<xsl:if test="@alt">
<tr>
<td><font size="-1"><ul><li><xsl:value-of select="@alt"/></li></ul></font></td>
</tr>
</xsl:if>
</table>
</div>
</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="fixme">
<div align="center">
<table border="1" cellpadding="2" cellspacing="2">
<xsl:if test="title">
<tr>
<td bgcolor="#800000">
<font color="#ffffff"><xsl:value-of select="title"/></font>
</td>
</tr>
</xsl:if>
<tr>
<td bgcolor="#c0c0c0">
<font color="#023264" size="-1"><xsl:apply-templates/></font>
</td>
</tr>
</table>
</div>
</xsl:template>
<xsl:template match="note">
<note><xsl:apply-templates/></note>
</xsl:template>
<xsl:template match="warn">
<div align="center">
<table border="1" cellpadding="2" cellspacing="2">
<xsl:if test="title">
<tr>
<td bgcolor="#800000">
<font color="#ffffff"><xsl:value-of select="title"/></font>
</td>
</tr>
</xsl:if>
<tr>
<td bgcolor="#c0c0c0">
<font color="#023264" size="-1"><xsl:apply-templates/></font>
</td>
</tr>
</table>
</div>
</xsl:template>
<xsl:template match="code">
<code><xsl:apply-templates/><xsl:if test="name(.)='function'"><xsl:text>()</xsl:text></xsl:if></code>
</xsl:template>
<xsl:template match="source">
<div align="center">
<table border="1" cellpadding="2" cellspacing="2">
<tr>
<td>
<pre>
<xsl:apply-templates/>
</pre>
</td>
</tr>
</table>
</div>
</xsl:template>
<xsl:template match="table">
<table border="0" cellpadding="2" cellspacing="2" width="100%">
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="th">
<th><xsl:apply-templates/></th>
</xsl:template>
<xsl:template match="tr">
<tr><xsl:apply-templates/></tr>
</xsl:template>
<xsl:template match="td">
<td><xsl:apply-templates/></td>
</xsl:template>
<xsl:template match="node()|@*" priority="-1">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
1.1 jakarta-avalon/src/documentation/skins/jakarta-site/xslt/html/site2xhtml.xsl
Index: site2xhtml.xsl
===================================================================
<?xml version="1.0"?>
<html xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version="1.0">
<head>
<meta content="text/html; charset=ISO-8859-1"/>
<title><xsl:value-of select="/site/body/title"/></title>
<style type="text/css">
<![CDATA[ body { background-color: white; font-size: normal; color: black ; }
a { color: #525d76; }
a.black { color: #000000;}
table {border-width: 0; width: 100%}
table.centered {text-align: center}
table.title {text-align: center; width: 80%}
img{border-width: 0;}
span.s1 {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
span.s1_white { font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #ffffff; }
span.title {font-family: Helvetica, Arial, sans-serif; font-weight: bold; color: #000000; }
span.c1 {color: #000000; font-family: Helvetica, Arial, sans-serif}
tr.left {text-align: left}
hr { width: 100%; size: 2} ]]>
</style>
</head>
<body>
<!-- header -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top"><a href="@group-logo.href@"><img src="@group-logo.src@" border="0" vspace="0" hspace="0"/></a></td><td bgcolor="#ffffff" align="left" valign="top" width="100%"><a href="@project-logo.href@"><img src="@project-logo.src@" align="right" border="0" vspace="0" hspace="0"/></a></td>
</tr>
<tr>
<td bgcolor="#525d76" colspan="2">
<span class="c1">
<a href="@link1.href@" class="black">@link1@  > </a>
<a href="@link2.href@" class="black">@link2@  > </a>
<a href="@link3.href@" class="black">@link3@</a>
</span></td>
</tr>
<tr>
<td height="8"></td>
</tr>
</table>
<!-- main -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<!-- left menu -->
<td width="1%"><br/></td>
<td width="14%" valign="top" nowrap="1">
<xsl:copy-of select="/site/menu/node()|@*"/>
</td>
<td width="1%"><br/></td>
<!-- contents -->
<td width="*" valign="top" align="left">
<xsl:copy-of select="/site/body/node()|@*"/>
</td>
</tr>
</table>
<br/>
<!-- footer -->
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td>
<hr size="1" noshade=""/>
</td>
</tr>
<tr>
<td align="center">
<i>Copyright © @year@ @vendor@. All Rights Reserved.</i>
</td>
</tr>
<tr>
<td width="100%" align="right">
<br/>
</td>
</tr>
<tr>
<td width="100%" align="right">
<a href="http://krysalis.org/"><img src="skin/images/krysalis-compatible.jpg" alt="Krysalis Logo"/></a>
<a href="http://xml.apache.org/cocoon/"><img src="skin/images/built-with-cocoon.gif" alt="Cocoon Logo"/></a>
<a href="http://jakarta.apache.org/ant/"><img src="skin/images/ant_logo_medium.gif" alt="Ant Logo"/></a>
</td>
</tr>
</tbody>
</table>
</body>
</html>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>