You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by fe...@apache.org on 2005/10/01 09:32:25 UTC
svn commit: r292938 -
/forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl
Author: ferdinand
Date: Sat Oct 1 00:32:18 2005
New Revision: 292938
URL: http://svn.apache.org/viewcvs?rev=292938&view=rev
Log:
Fixed table-template that overwrote class with ForrestTable and always inserted padding attributes etc.
Now this only happens in tables w/o class. tables with class are copied as is.
Modified:
forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl
Modified: forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl?rev=292938&r1=292937&r2=292938&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl (original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl Sat Oct 1 00:32:18 2005
@@ -246,10 +246,26 @@
<xsl:template match="table">
<xsl:apply-templates select="@id"/>
- <table cellpadding="4" cellspacing="1" class="ForrestTable">
- <xsl:copy-of select="@cellspacing | @cellpadding | @border | @class | @bgcolor |@id"/>
- <xsl:apply-templates/>
- </table>
+ <xsl:choose>
+ <!-- Limit Forrest specific processing to tables without class -->
+ <xsl:when test="@class = ''">
+ <table cellpadding="4" cellspacing="1" class="ForrestTable">
+ <xsl:copy-of select="@cellspacing | @cellpadding | @border | @class | @bgcolor |@id"/>
+ <xsl:apply-templates/>
+ </table>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- Tables with class are passed without change -->
+ <xsl:copy>
+ <xsl:copy-of select="@*"/>
+ <xsl:apply-templates/>
+ </xsl:copy>
+
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="@class = ''">
+
+ </xsl:if>
</xsl:template>
<xsl:template match="acronym/@title">