Author: rgardler
Date: Sat Mar 3 01:43:19 2007
New Revision: 514107
URL: http://svn.apache.org/viewvc?view=rev&rev=514107
Log:
Ensure changes are correctly generated if contexts are not used (i.e. older
status.xml files) (Fixes FOR-958, DUE-TO Vadim Gritsenko)
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
Modified:
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl?view=diff&rev=514107&r1=514106&r2=514107
==============================================================================
---
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
(original)
+++
forrest/trunk/plugins/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl
Sat Mar 3 01:43:19 2007
@@ -130,34 +130,57 @@
<xsl:text> </xsl:text>
<xsl:value-of select="@version"/> (<xsl:value-of select="@date"/>)</title>
<xsl:apply-templates select="introduction"/>
+
<xsl:for-each
select="action[generate-id()=generate-id(key('contexts',concat(../@version,
'_', @context)))]">
<xsl:sort select="@context"/>
- <section>
<xsl:variable name="context" select="@context"/>
- <title>
+ <xsl:variable name="title">
+ <xsl:choose>
+ <xsl:when test="//contexts/[EMAIL PROTECTED]">
+ <xsl:value-of select="//contexts/[EMAIL PROTECTED]/@title"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@context"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
<xsl:choose>
- <xsl:when test="//contexts/[EMAIL PROTECTED]">
- <xsl:value-of select="//contexts/[EMAIL PROTECTED]/@title"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@context"/>
- </xsl:otherwise>
- </xsl:choose>
- </title>
- <ul>
- <xsl:choose>
- <xsl:when test="contains($projectInfo.changes.sort, 'type')">
- <xsl:apply-templates select="key('contexts',concat(../@version, '_',
@context) )">
+ <xsl:when test="$title != ''">
+ <section>
+ <title><xsl:value-of select="$title"/></title>
+ <ul>
+ <xsl:choose>
+ <xsl:when test="contains($projectInfo.changes.sort, 'type')">
+ <xsl:apply-templates select="key('contexts',concat(../@version,
'_', @context) )">
<xsl:sort select="@type"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <xsl:apply-templates select="key('contexts',concat(../@version, '_',
@context) )"/>
- </xsl:otherwise>
- </xsl:choose>
- </ul>
- </section>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="key('contexts',concat(../@version,
'_', @context) )"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </ul>
+ </section>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul>
+ <xsl:choose>
+ <xsl:when test="contains($projectInfo.changes.sort, 'type')">
+ <xsl:apply-templates select="key('contexts',concat(../@version,
'_', @context) )">
+ <xsl:sort select="@type"/>
+ </xsl:apply-templates>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="key('contexts',concat(../@version,
'_', @context) )"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </ul>
+ </xsl:otherwise>
+ </xsl:choose>
+
</xsl:for-each>
+
<xsl:if test="$projectInfo.changes.includeContributorList = 'true'">
<section>
<title><i18n:text i18n:key="release_committers">Contributors to this
release</i18n:text></title>