Altova Mailing List Archives
>microsoft.public.xsl Archive Home
>Thread Prev - Grouping By Field, with only 3 columns in each row.
>Thread Next - Re: Grouping By Field, with only 3 columns in each row.
Re: Grouping By Field, with only 3 columns in each row.
Date: 12/21/2004 4:14:00 PM
The problem is with this template: <xsl:template match="IssuedCard" mode="row"> <tr> <xsl:apply-templates select=". | following-sibling::*[DateIssued = current()/DateIssued][position() < $maxColCount]"/> </tr> </xsl:template> note that following-sibling includes all sibling nodes in the original nodeset, even those that do not meet the key condition. Also I wanted to point out a potential problem with using this uniqueness test: IssuedCard[count(. | key('CardsIssuedByDateIssued', DateIssued)) = 1] If there are IssuedCard elements without a DateIssued child, they will show up in the nodeset selected by that expression. The reason is that key('CardsIssuedByDateIssued', DateIssued)) will return no node in this case, so the count of the current node plus nothing is always one. In your particular case this is probably not an issue, but watch out for it when using muenchian grouping. That's why I still use the generate-id() approach myself, even though it's not quite a fast on the processors I use. Regards, Mike Sharp