Hi

if you realy like this update, can you post it to the devel list?
So we can include it, maybe call it ModificationsGroupedByChangeNumber.xsl



with kind regards
Ruben Willems


On Sat, Apr 24, 2010 at 12:03 PM, Ian G <[email protected]> wrote:

> Hi Arieh,
>
> Thanks for the updates they're really good. (I was sure I'd sliced off
> the "<!-- Modifications template -->" bit before posting - obvious
> copy'n'pasted the wrong bit :-D).
>
> Regards
> Ian
>
> On Apr 23, 1:18 am, Arieh Schneier <[email protected]> wrote:
> > Ok, sorry to be posting again, but I liked this change and was using
> > it... One last modification (hopefully that's it) was to sort the
> > changelists in descending order to keep them consistent with the way
> > they were before. So change this line:
> >                                 <xsl:sort select="changeNumber"/>
> > to
> >                                 <xsl:sort select="changeNumber"
> order="descending"/>
> >
> > Thanks.
> >
> > On Apr 19, 1:37 pm, Arieh Schneier <[email protected]> wrote:
> >
> > > 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>
> >
> > >                         <!-- Seehttp://
> 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