Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Page and Sorting a XML data Page and Sorting a XML dataTo: NULL Date: 12/6/2004 5:06:00 PM I have a rather large xml data set that although loads quickly rendering the
entire set on a single page is very inneficient. IE takes a while when you
ask it to render a 1200 row table client side :-)
So the obvious solution is to introduce paging to my interface with the
usual page next/previous/last/first functions. Easy enough but I also do
sorting and I am wondering if am looking at this correctly.
Assuming the following xml:
<root>
<item firstname="yadda" lastname="yadda" />
...1000's of item
</root>
Assuming a page size of 100 and we are on page 3 the xsl:for-each is thus
<xsl:for-each select="/ROOT/item[position() > 300 and position() <
401]">
Easy enough, but what if I introduce sorting, as in:
<xsl:for-each select="/ROOT/item[position() > 300 and position() <
401]">
<xsl:sort select="@lastname" data-type="text" order="descending">
.. do my thing
</xsl:sort>
</xsl:for-each>
Assuming the xml I original retreived is already sorted by firstname does
this not mean that the above is going to select items 301 to 400 based on
the current xml order THEN sort those results by lastname or am I thinking
far to linear?
Cheers
Keith
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
