This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Sorting & Grouping


>  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]