I made 1 further change - added the number of files in the changelist
(and changed the widths appropriately). I have stripped out the
unnecessary stuff (for collapsing) and posted below (haven't tried
after the stripping, but it should still work):

----


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="2.0">

        <xsl:output method="html"/>

        <xsl:variable name="modification.list" select="/cruisecontrol/
modifications/modification"/>
        <xsl:key name="modifications-by-changelist" match="modification"
use="changeNumber" />

        <xsl:template match="/">
                <table class="section-table" cellpadding="2" cellspacing="0"
                                border="0" width="98%" 
style="border-collapse:collapse;" >
                        <!-- Modifications -->
                        <tr>
                                <td class="sectionheader" colspan="5">
                                        Modifications since last build 
(<xsl:value-of
select="count($modification.list)"/>)
                                </td>
                        </tr>

                        <!-- See 
http://www.jenitennison.com/xslt/grouping/muenchian.html
for an explanation of this grouping trick. -->
                        <xsl:for-each select="/cruisecontrol/modifications/
modification[count(. | key('modifications-by-changelist',changeNumber)
[1]) = 1]">
                                <xsl:sort select="changeNumber"/>
                                <tr>
                                        <td>
                                                <table width="100%" border="0">
                                                        <tr style="font-weight: 
bold;">
                                                                <td class="" 
valign="top" width="25%">
                                                                        
<xsl:value-of select="changeNumber"/>
                                                                </td>
                                                                <td class="" 
valign="top" width="25%">
                                                                        
<xsl:value-of select="user"/>
                                                                </td>
                                                                <td class="" 
valign="top">
                                                                        
<xsl:value-of select="date"/>
                                                                </td>
                                                                <td class="" 
valign="top" width="20%">
                                                                        
<xsl:value-of select="count(key('modifications-by-
changelist', changeNumber))"/> Files
                                                                </td>
                                                        </tr>
                                                        <tr 
style="border-bottom: 1px dotted gray;">
                                                                <td 
class="section-data" valign="top" colspan="3">
                                                                        
<xsl:value-of select="comment" />
                                                                </td>
                                                        </tr>
                                                </table>
                                                <table width="100%" border="0">
                                                        <xsl:for-each 
select="key('modifications-by-changelist',
changeNumber)">
                                                                <xsl:sort 
select="project" />
                                                                <tr>
                                                                        <xsl:if 
test="position() mod 2=0">
                                                                                
<xsl:attribute name="class">section-evenrow</xsl:attribute>
                                                                        
</xsl:if>
                                                                        <xsl:if 
test="position() mod 2!=0">
                                                                                
<xsl:attribute name="class">section-oddrow</xsl:attribute>
                                                                        
</xsl:if>
                                                                        <td 
class="section-data">
                                                                                
<xsl:value-of select="project" />
                                                                        </td>
                                                                        <td 
class="section-data" width="30%">
                                                                                
<xsl:value-of select="filename" />
                                                                        </td>
                                                                        <td 
class="section-data" width="7%">
                                                                                
<xsl:value-of select="@type" />
                                                                        </td>
                                                                </tr>
                                                        </xsl:for-each>
                                                </table>
                                        </td>
                                </tr>
                                <tr style="border-bottom: 1px solid;">
                                        <td colspan="0"></td>
                                </tr>
                        </xsl:for-each>
                </table>
        </xsl:template>
</xsl:stylesheet>


-- 
Subscription settings: http://groups.google.com/group/ccnet-user/subscribe?hl=en

Reply via email to