This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: last(): selecting the last one?
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 23 Apr 2002 11:39:45 +0300
- Subject: RE: [xsl] last(): selecting the last one?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Heppa,
> No that it selects the right one, I was trying to make the
> link to the
> document like I managed to do earlier, but now it does not work.
>
>
> <xsl:variable name="recent">
> <xsl:for-each select="Document/Information">
> <xsl:sort select="Time" order="ascending" />
> <xsl:sort select="Clock" order="ascending" />
> <xsl:if test="position() = last()">
> <a href="{Subject/@id}.htm">
> <xsl:apply-templates select="Subject" /></a>
> </xsl:if>
> </xsl:for-each>
> </xsl:variable>
>
> The result of my xsl is:
> <b>Message count= </b>11</p>
> </td><td width="319" valign="top" bgcolor="#C4DAFE">
> <p>
> <b>Recent message: </b>RE:Juu Juu</p>
> </td><td width="248" valign="top" bgcolor="#C4DAFE">
> <p>
> <b>Sender: </b>Moilanen Jarkko</p>
>
> So it seems that the link is not created, why?
Hard to say without seeing the part where you use the $recent, but it could be that you're using xsl:value-of instead of xsl:copy-of.
Cheers,
Santtu
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list