You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2003/08/07 05:32:14 UTC
cvs commit: cocoon-2.1/src/documentation/stylesheets changes2document.xsl statuschanges2document.xsl
joerg 2003/08/06 20:32:14
Modified: src/documentation/stylesheets changes2document.xsl
statuschanges2document.xsl
Log:
handling multiple, comma separated bugs in changes (@fixesbug)
Revision Changes Path
1.2 +15 -4 cocoon-2.1/src/documentation/stylesheets/changes2document.xsl
Index: changes2document.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/documentation/stylesheets/changes2document.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- changes2document.xsl 9 Mar 2003 00:07:31 -0000 1.1
+++ changes2document.xsl 7 Aug 2003 03:32:14 -0000 1.2
@@ -8,7 +8,9 @@
<xsl:param name="name"/>
- <xsl:variable name="bugzilla">http://nagoya.apache.org/bugzilla/show_bug.cgi?id=</xsl:variable>
+ <xsl:variable name="bugzilla" select="'http://nagoya.apache.org/bugzilla/'"/>
+ <xsl:variable name="singleBug" select="concat($bugzilla, 'show_bug.cgi?id=')"/>
+ <xsl:variable name="buglist" select="concat($bugzilla, 'buglist.cgi?bug_id=')"/>
<xsl:template match="changes">
<document>
@@ -52,9 +54,18 @@
<xsl:if test="@fixes-bug">
<xsl:text> Fixes </xsl:text>
- <link href="{$bugzilla}{@fixes-bug}">
- <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
- </link>
+ <xsl:choose>
+ <xsl:when test="contains(@fixes-bug, ',')">
+ <link href="{$buglist}{@fixes-bug}">
+ <xsl:text>bugs </xsl:text><xsl:value-of select="@fixes-bug"/>
+ </link>
+ </xsl:when>
+ <xsl:otherwise>
+ <link href="{$singleBug}{@fixes-bug}">
+ <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
+ </link>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>.</xsl:text>
</xsl:if>
</li>
1.2 +15 -4 cocoon-2.1/src/documentation/stylesheets/statuschanges2document.xsl
Index: statuschanges2document.xsl
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/documentation/stylesheets/statuschanges2document.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- statuschanges2document.xsl 6 Apr 2003 04:13:23 -0000 1.1
+++ statuschanges2document.xsl 7 Aug 2003 03:32:14 -0000 1.2
@@ -8,7 +8,9 @@
<xsl:param name="name"/>
- <xsl:variable name="bugzilla">http://nagoya.apache.org/bugzilla/show_bug.cgi?id=</xsl:variable>
+ <xsl:variable name="bugzilla" select="'http://nagoya.apache.org/bugzilla/'"/>
+ <xsl:variable name="singleBug" select="concat($bugzilla, 'show_bug.cgi?id=')"/>
+ <xsl:variable name="buglist" select="concat($bugzilla, 'buglist.cgi?bug_id=')"/>
<xsl:template match="/">
<xsl:apply-templates select="//changes"/>
@@ -56,9 +58,18 @@
<xsl:if test="@fixes-bug">
<xsl:text> Fixes </xsl:text>
- <link href="{$bugzilla}{@fixes-bug}">
- <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
- </link>
+ <xsl:choose>
+ <xsl:when test="contains(@fixes-bug, ',')">
+ <link href="{$buglist}{@fixes-bug}">
+ <xsl:text>bugs </xsl:text><xsl:value-of select="@fixes-bug"/>
+ </link>
+ </xsl:when>
+ <xsl:otherwise>
+ <link href="{$singleBug}{@fixes-bug}">
+ <xsl:text>bug </xsl:text><xsl:value-of select="@fixes-bug"/>
+ </link>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>.</xsl:text>
</xsl:if>
</li>