Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: XSL sorting problem >Thread Next - Re: XSL sorting problem Re: XSL sorting problemTo: NULL Date: 7/3/2005 6:00:00 AM OK, try the following:
1.) sort all thumbnails by date and store them in a variable (e.g.
"sorted")
2.) select the first, third etc. as you did above by using mod 2 = 1,
but from $sorted instead of the original document, and store the
result in another variable ("uneven")
3.) select the second, fouth etc. thumbnail by using mod 2 = 0 on
$sorted, store in ("even")
4.) Use a for-each on "uneven" and construct you table rows.
5.) Watch out for the last row ... it might not contain an element in
"$even"
There might be a more elegant way, but I could not come up with one.
But this should work ;-)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
