Subject: RE: SAXON: Generate 10 elements per page
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2004 13:06:27 -0000
|
> I have the following xml document with 1 million rows.
> I want to generate html pages using SAXON with 10 rows on each page.
>
> Any suggestion?
> /s
>
> <import>
> <Row>
> <Field1>Match1</Field1>
> <Field2>2004-10-01</Field2>
> <Field3>Team A</Field3>
> <Field4>Team B</Field4>
> </Row>
> </import>
Well you could use position() mod 10=1 to get every tenth row, and then
apply-templates to each of the following 9 siblings BUT......
...with 1 million rows you will probably be waiting a while for the
document to load into memory, so you would be better of writing a sax
filter and processing only 100 rows at a time (and then rebuilding the
result), or using something like STX which can transform the xml as its
read in.
cheers
andrew
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|