![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - sorting and filtering oh my! >Thread Next - Re: sorting and filtering oh my! Re: sorting and filtering oh my!To: NULL Date: 10/2/2007 11:32:00 PM snafu7x7 wrote: > since the library is rather large I want the stylesheet to be able to > accept parameters for a range of items to return (say the first 100, > or the last 50, or whatever). How can I accomplish this in conjunction > with my sorting? Interesting question. If you look at the spec's example of numbering (http://www.w3.org/TR/xslt#number), you'll see that position() within the body of a for-each reports the position *after* sorting. So that's one approach -- for-each over the sorted set, test position(), and only apply-templates if the position is within the range you're interested in. There are probably a dozen other ways to accomplish this. I'd suggest checking the sorting section of the XSLT FAQ website -- wonderful resource! -- and possibly other related sections as well, to see if someone has contributed a more elegant solution. -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
