You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by cm...@apache.org on 2003/07/14 18:50:37 UTC
cvs commit: jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets document2html.xsl
cmlenz 2003/07/14 09:50:37
Modified: documentation/docs/skins/jakarta.apache.org/stylesheets
document2html.xsl
Log:
Replace carriage returns in the cvs changelog log messages with <br> tags
Revision Changes Path
1.47 +23 -2 jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl
Index: document2html.xsl
===================================================================
RCS file: /home/cvs/jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- document2html.xsl 14 Jul 2003 16:43:43 -0000 1.46
+++ document2html.xsl 14 Jul 2003 16:50:36 -0000 1.47
@@ -805,7 +805,9 @@
</xsl:for-each>
</td>
<td>
- <xsl:value-of select="msg"/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="msg"/>
+ </xsl:call-template>
</td>
</tr>
</xsl:template>
@@ -944,4 +946,23 @@
</xsl:choose>
</xsl:template>
+ <!-- ==================================================================== -->
+ <!-- Converts a carriage return into a br tag -->
+ <!-- ==================================================================== -->
+ <xsl:template name="br-replace">
+ <xsl:param name="word"/>
+ <xsl:choose>
+ <xsl:when test="contains($word,'
')">
+ <xsl:value-of select="substring-before($word,'
')"/>
+ <br/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="substring-after($word,'
')"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$word"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org