Subject: [xsl] Re: Re: Re: distinct moves problem From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Thu, 10 Jan 2002 12:10:21 -0800 (PST) |
Ahmad J Reeves <ahmad at dcs dot qmul dot ac dot uk> wrote: > Hi Dimitre, > > Many thanks for that, indeed it does give the accurate > number of moves of each character. The only slight difficulty > is that it also produces duplicates, e.g. > > Character_ID: 18815 : > 48984 > 5050 > 293 > 293 > 293 Hi Ahmad, I finally seem to understand the problem. To solve it, please, replace the end of the stylesheet with the following: <xsl:for-each select="$vUniqueCharactersSending"> <xsl:value-of select="concat('Character_ID: ', CHARACTER_ID, ':', $NL )"/> <xsl:for-each select="/LOG/DIRECT/CHARACTER_ID [. = current()/CHARACTER_ID]"> <xsl:if test="not(../LOCATION_ID = ../preceding-sibling::DIRECT [CHARACTER_ID = current()]/LOCATION_ID)"> <xsl:value-of select="concat(' ', ../LOCATION_ID, $NL)"/> </xsl:if> </xsl:for-each> </xsl:for-each> </xsl:template> </xsl:stylesheet> Now the transformation does not produce duplicate rooms for a character. Cheers, Dimitre. __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xslt and JSP 1.2, Bryan Rasmussen | Thread | [xsl] Re: Re: Re: distinct moves pr, Dimitre Novatchev |
[xsl] xslt and JSP 1.2, Kevin . Gutch | Date | Re: [xsl] Comparing multiple dates , Joerg Heinicke |
Month |