| Subject: Re: [xsl] How to efficiently obtain the first 10 records of a  file with over 2 million records? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Jul 2023 15:37:53 -0000 | 
obtain the first 10 <record> elements.
I have an XML file containing over 2 million <record> elements. I want to
Here's how I did it:
<xsl:for-each select="/Document/record[position() le 10]"> <xsl:sequence select="."/> </xsl:for-each>
I ran it and it took a long time to complete. I am guessing that the XSLT
processor is iterating over all 2 million <record> elements. Yes? How to write the XSLT code so that the XSLT processor stops iterating upon processing the first 10 <record> elements?
to ensure that Saxon stops processing after the 10 records, run from the command line with -t and look for an early exit message to confirm.
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| Re: [xsl] How to efficiently obtain, Ryan Livingstone rya | Thread | Re: [xsl] How to efficiently obtain, Martin Honnen martin | 
| Re: [xsl] How to efficiently obtain, Ryan Livingstone rya | Date | Re: [xsl] How to efficiently obtain, Martin Honnen martin | 
| Month |