Author: rgardler
Date: Wed Dec 7 11:58:13 2005
New Revision: 354838
URL: http://svn.apache.org/viewcvs?rev=354838&view=rev
Log:
check for existence of @class to prevent an extra space being added when not
needed
Modified:
forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
Modified: forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
URL:
http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl?rev=354838&r1=354837&r2=354838&view=diff
==============================================================================
--- forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl
(original)
+++ forrest/trunk/main/webapp/skins/common/xslt/html/document-to-html.xsl Wed
Dec 7 11:58:13 2005
@@ -227,7 +227,13 @@
<xsl:template match="code">
<xsl:apply-templates select="@id"/>
- <span class="codefrag [EMAIL PROTECTED]">
+ <span>
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="@class">codefrag <xsl:value-of
select="@class"/></xsl:when>
+ <xsl:otherwise>codefrag</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
<xsl:copy-of select="@id"/>
<xsl:value-of select="."/>
</span>