Jump to content

Limit the amount of records


Kovo
 Share

Recommended Posts

How can I limit the amount of records shown and spread them out in pages.To make it more clear: If I have an XML database with a thousand records and am formatting it with XSLT, how do I limit the amount of records shown? Since having a thousand records load on one page is time consuming and ineffeicent, how can I set a limit and have several pages? Is it possible?thanks.

Link to comment
Share on other sites

No matter the XSLT, the XML is still going to be downloaded all first, so technically speaking, you must devide the XML in several files and apply a single XSLT on all of them. If each page has it's identifier, you may use that identifier in the XSLT to generate a link to the next page.This doesn't apply if you use a server side script though. The user would only have to download the output, not the whole XML file and the XSLT, but this would still cost server resources, scince it will have to load and process such large file every time someone asks for it.That's infact the reason why SQL is used for catalogue purposes, and XML is used for everything else (interface data for starters)- because the server connects to the database with previously created SQL statement and processes only the result from it. With XML, the whole file is loaded, then the whole is processed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...