forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Pablos <che...@che-che.com>
Subject Re: changes2document.xsl - handling multiple bugs in @fixes-bug
Date Thu, 07 Aug 2003 10:22:44 GMT
Joerg,

Added to CVS, But spaces on bug fixes produce a wrong url.

I can fix that, But I think that is the users responsability to add 
content properly.

Cheers,
Cheche

Joerg Heinicke wrote:
> Sometimes we don't want to add an <action/>s for each bug fixed, so that
> it would be cool to add more than one bug in @fixes-bug (e.g. comma
> separated).
> 
> 2 possibilities:
> 1. http://nagoya.apache.org/bugzilla/buglist.cgi?bug_id=111,222,333
> 2. one linke for each bug
> 
> Is there any interest?
> 
> The first and simple one I have applied as patch. I can implement the 
> other one (using a recursive template) if that's prefered.
> 
> Regards,
> 
> Joerg
> 
> 
> ------------------------------------------------------------------------
> 
> cvs -z3 -q diff -u changes2document.xsl (in directory D:\xml-forrest\src\resources\stylesheets\)
> Index: changes2document.xsl
> ===================================================================
> RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/changes2document.xsl,v
> retrieving revision 1.12
> diff -u -r1.12 changes2document.xsl
> --- changes2document.xsl	12 Feb 2003 04:58:14 -0000	1.12
> +++ changes2document.xsl	7 Aug 2003 03:16:52 -0000
> @@ -6,7 +6,9 @@
> 
>   <xsl:import href="copyover.xsl"/>
> 
> - <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>



Mime
View raw message