This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: (xsl) processing siblings based on sorted order, not document order
- To: scunliffe at digitalfairway dot com
- Subject: [xsl] Re: (xsl) processing siblings based on sorted order, not document order
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- Date: Fri, 25 May 2001 21:33:20 -0700 (PDT)
- Cc: xsl-list at lists dot mulberrytech dot com
- Reply-To: xsl-list at lists dot mulberrytech dot com
> You'll simply replace:
>
> following-sibling::bar[position() < 3]
>
> with
>
> $nodes[position()=$sortResult[position()=$currentPosition + 1]
>
> |
>
> $nodes[position()=$sortResult[position()=$currentPosition + 2]
>
>
OOppss...
A minor correction -- accessing the n-th sorted node from the node-list is like
this:
$nodes[position() = substring($sortResults,
($n - 1) * ($posLength+1) + 1,
$posLength)
]
Dimitre.
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list