forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ferdin...@apache.org
Subject svn commit: r292938 - /forrest/trunk/main/webapp/skins/common/xslt/html/document2html.xsl
Date Sat, 01 Oct 2005 07:32:25 GMT
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">



Mime
View raw message