Author: kkolinko
Date: Thu Apr 22 17:42:32 2010
New Revision: 936982
URL: http://svn.apache.org/viewvc?rev=936982&view=rev
Log:
Replace spaces with underscore in HTML anchor names.
To preserve compatibility each (sub)section will now generate two anchors:
the old one and the new one, if they differ.
Modified:
tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl
Modified: tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl
URL:
http://svn.apache.org/viewvc/tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl?rev=936982&r1=936981&r2=936982&view=diff
==============================================================================
--- tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl (original)
+++ tomcat/site/trunk/xdocs/stylesheets/tomcat-site.xsl Thu Apr 22 17:42:32 2010
@@ -179,11 +179,15 @@
<xsl:variable name="name">
<xsl:value-of select="@name"/>
</xsl:variable>
+ <xsl:variable name="name2">
+ <xsl:value-of select="translate($name, ' ', '_')"/>
+ </xsl:variable>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<!-- Section heading -->
<tr><td bgcolor="{$banner-bg}">
<font color="{$banner-fg}" face="arial,helvetica,sanserif">
- <a name="{$name}">
+ <xsl:if test="$name != $name2"><a
name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if>
+ <a name="{$name2}">
<strong><xsl:value-of select="@name"/></strong></a></font>
</td>
<xsl:if test="@rtext">
@@ -217,11 +221,15 @@
</xsl:if>
<xsl:value-of select="@name"/>
</xsl:variable>
+ <xsl:variable name="name2">
+ <xsl:value-of select="translate($name, ' ', '_')"/>
+ </xsl:variable>
<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="{$name}">
+ <xsl:if test="$name != $name2"><a
name="{$name}"><xsl:comment>()</xsl:comment></a></xsl:if>
+ <a name="{$name2}">
<strong><xsl:value-of select="@name"/></strong></a></font>
</td></tr>
<!-- Subsection body -->
@@ -247,7 +255,10 @@
</xsl:if>
<xsl:value-of select="@name"/>
</xsl:variable>
- <li><a href="#{$name}"><xsl:value-of select="@name"/></a>
+ <xsl:variable name="name2">
+ <xsl:value-of select="translate($name, ' ', '_')"/>
+ </xsl:variable>
+ <li><a href="#{$name2}"><xsl:value-of select="@name"/></a>
<xsl:if test="subsection">
<ol><xsl:apply-templates mode="toc" select="subsection"/></ol>
</xsl:if>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]