Hi Cory,
I did nearly exactly what you describe this week.
Instead of 1)/2) I directly generated a stream of SAX2-Events from the
database.
Before I had memory problems and the maximum node count of 1 M Nodes of the
XLST Transformer.
I tried different scenarios (always creating a Templates object from the xlst
stylesheet)
1. Create a TransFormerHandler for each "XML Stream Element" (XSE)
2. Create a TransformerHandler for every 100 XSE
3. Create a DOM-Tree for each XSE and use a fresh Transformer each time
to convert
All these szenarios work and offer round about the same speed but it's to slow
for me :-(
My XSLT-Stylesheet is not very good so maybe thats part of my problem.
David Bertoni offered an alternative and I will try that soon.
I have XSEs of about 100 Attributes each and the transformation of one XSE
costs about 200ms on a 700 MHz PIII.
Thats far too slow for exporting lots of objects.
Ciao,
Carsten Heyl
"Cory Isaacson (Compuflex)" wrote:
> Joseph,
>
> This is very helpful. As we'll be dealing mostly with database records, they
> can indeed be formatted as small chunks (or even individual records by
> type). I'm thinking now of using a flow like this:
>
> 1) Output a query of rows incrementally as an XML stream
> 2) Parse the stream using a SAX2 Parser (the one in Xerces)
> 3) Use SAX2 events to determine which type of data it is, and what XSLT
> stylesheet applies;
> 4) Transform the XML element
> 5) Output a stream of transformed segments
> 6) Write the results to an output file (typically HTML)
>
> We also may be able to chunk groups of similar records with some sort of
> preset buffer size. Let me know if you see any huge gotchas with this, but
> so far it seems like using Transformers in Xalan is very fast, and so if I
> repetitively call them I'm thinking it should perform pretty well.
>
> Thanks in advance for the help.
>
> Cory
>
>
--
Carsten Heyl [EMAIL PROTECTED]
Pixelboxx GmbH http://www.pixelboxx.de/
Ostenhellweg 56-58 Tel.: +49 231 53 46 30
D-44135 Dortmund Mobile: +49 174 31 83 608