Author: kkolinko Date: Wed Mar 3 11:01:18 2010 New Revision: 918403 URL: http://svn.apache.org/viewvc?rev=918403&view=rev Log: Copy tomcat-docs.xsl from trunk. This adds support for: - <rev> tag - link to a svn revision (r631321, r918396) - <toc> tag - generation of a table of contents (r918073)
Modified: tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl Modified: tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl?rev=918403&r1=918402&r2=918403&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl (original) +++ tomcat/tc6.0.x/trunk/webapps/docs/tomcat-docs.xsl Wed Mar 3 11:01:18 2010 @@ -40,6 +40,7 @@ <xsl:param name="project-menu" select="'menu'"/> <xsl:param name="standalone" select="''"/> <xsl:param name="buglink" select="'http://issues.apache.org/bugzilla/show_bug.cgi?id='"/> + <xsl:param name="revlink" select="'http://svn.apache.org/viewvc?view=rev&rev='"/> <!-- Defined variables (non-overrideable) --> <xsl:variable name="body-bg" select="'#ffffff'"/> @@ -105,9 +106,7 @@ </xsl:if> </td> <td> - <font face="arial,helvetica,sanserif"> - <h1><xsl:value-of select="$project/title"/></h1> - </font> + <h1><font face="arial,helvetica,sanserif"><xsl:value-of select="$project/title"/></font></h1> </td> <td> <xsl:comment>APACHE LOGO</xsl:comment> @@ -133,7 +132,7 @@ <tr> <xsl:comment>LEFT SIDE NAVIGATION</xsl:comment> - <td width="20%" valign="top" nowrap="true" class="noPrint"> + <td width="20%" valign="top" nowrap="nowrap" class="noPrint"> <xsl:apply-templates select="project/body/menu"/> </td> @@ -237,6 +236,23 @@ </xsl:template> + <!-- Generate table of contents --> + <xsl:template match="toc"> + <ul><xsl:apply-templates mode="toc" select="following::section"/></ul> + </xsl:template> + + <xsl:template mode="toc" match="section|subsection"> + <xsl:variable name="name"> + <xsl:value-of select="@name"/> + </xsl:variable> + <li><a href="#{$name}"><xsl:value-of select="@name"/></a> + <xsl:if test="subsection"> + <ol><xsl:apply-templates mode="toc" select="subsection"/></ol> + </xsl:if> + </li> + </xsl:template> + + <!-- Process a source code example --> <xsl:template match="source"> <xsl:variable name="void"> @@ -246,35 +262,35 @@ <table cellspacing="4" cellpadding="0" border="0"> <tr> <td bgcolor="{$source-color}" width="1" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" width="1" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> <tr> <td bgcolor="{$source-color}" width="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="#ffffff" height="1"><pre> <xsl:value-of select="."/> </pre></td> <td bgcolor="{$source-color}" width="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> <tr> <td bgcolor="{$source-color}" width="1" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> <td bgcolor="{$source-color}" width="1" height="1"> - <img src="{$void}" width="1" height="1" vspace="0" hspace="0" border="0"/> + <img src="{$void}" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/> </td> </tr> </table> @@ -451,6 +467,12 @@ <xsl:variable name="link"><xsl:value-of select="$buglink"/><xsl:value-of select="text()"/></xsl:variable> <a href="{$link}"><xsl:apply-templates/></a> </xsl:template> + + <!-- Link to a SVN revision report --> + <xsl:template match="rev"> + <xsl:variable name="link"><xsl:value-of select="$revlink"/><xsl:value-of select="text()"/></xsl:variable> + <a href="{$link}">r<xsl:apply-templates/></a> + </xsl:template> <!-- Process everything else by just passing it through --> <xsl:template match="*|@*"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org