Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Page and Sorting a XML data

From: "Keith Chadwick" <webmaster-nospam@--------------.--->
To: 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() &gt; 300 and position() &lt; 
401]">

Easy enough, but what if I introduce sorting, as in:

<xsl:for-each select="/ROOT/item[position() &gt; 300 and position() &lt; 
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




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent