This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Sorting & Grouping
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Sorting & Grouping
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 27 Apr 2001 15:19:52 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I appreciate your help. I read in documentation that AXIS refers to
> document order and not sorted order.
>
> I used following xsl and it did't work.
> <xsl:when
> test="self::node()[name(preceding-sibling::*)!= name()]">
That predicate is true if the first preceding sibling has a different name.
This means, first in document order. To test whether the last preceding
sibling (ie. the immediately preceding sibling) has a different name, write
test="self::node()[name(preceding-sibling::*[1])!= name()]">
or equivalently:
test="name(preceding-sibling::*[1])!= name()">
Mike Kay
Software AG
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list