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: (xsl) processing siblings based on sorted order, not document order


> 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


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