You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/03/04 22:12:58 UTC
svn commit: r633646 - in /lenya/sandbox/modules/forrest/xslt:
forrestDocument202xhtml.xsl svnLog2document.xsl
Author: andreas
Date: Tue Mar 4 13:12:57 2008
New Revision: 633646
URL: http://svn.apache.org/viewvc?rev=633646&view=rev
Log:
Improving table styling for forrest documents.
Modified:
lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl
lenya/sandbox/modules/forrest/xslt/svnLog2document.xsl
Modified: lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl?rev=633646&r1=633645&r2=633646&view=diff
==============================================================================
--- lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl (original)
+++ lenya/sandbox/modules/forrest/xslt/forrestDocument202xhtml.xsl Tue Mar 4 13:12:57 2008
@@ -137,6 +137,31 @@
</xsl:template>
+ <!-- Don't apply text nodes in tables, otherwise position() doesn't work for row selection. -->
+ <xsl:template match="table">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
+
+
+ <xsl:template match="table[@class = 'list' or @class = 'properties']/tr">
+ <xsl:copy>
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="position() mod 2 = 0">row1</xsl:when>
+ <xsl:otherwise>row2</xsl:otherwise>
+ </xsl:choose>
+ <xsl:if test="@class">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="@class"/>
+ </xsl:if>
+ </xsl:attribute>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+
<xsl:template match="*|@*|node()|text()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="*|@*|node()|text()"/>
Modified: lenya/sandbox/modules/forrest/xslt/svnLog2document.xsl
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/forrest/xslt/svnLog2document.xsl?rev=633646&r1=633645&r2=633646&view=diff
==============================================================================
--- lenya/sandbox/modules/forrest/xslt/svnLog2document.xsl (original)
+++ lenya/sandbox/modules/forrest/xslt/svnLog2document.xsl Tue Mar 4 13:12:57 2008
@@ -47,13 +47,9 @@
<xsl:template match="logentry">
<tr>
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="position() mod 2 = 0">row1</xsl:when>
- <xsl:otherwise>row2</xsl:otherwise>
- </xsl:choose>
- <xsl:if test="starts-with(msg, '[minor change]')"> minorChange</xsl:if>
- </xsl:attribute>
+ <xsl:if test="starts-with(msg, '[minor change]')">
+ <xsl:attribute name="class">minorChange</xsl:attribute>
+ </xsl:if>
<xsl:variable name="type">
<xsl:choose>
<xsl:when test="contains(paths/path[1]/@action, 'A')">add</xsl:when>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org