Subject: Re: [xsl] Software From: Andrew Welch <andrew.j.welch@xxxxxxxxx> Date: Sun, 1 May 2011 08:56:23 +0100 |
On 30 April 2011 21:59, Ginny Wagner <ginnywagner@xxxxxxxxxxxxxx> wrote: > I've been trying to use oXygen to transform xml files with xsl and it can't > handle them. I'm totally frustrated now and wonder what you guys use ... > surely I'm not the only person in the world with 26mb files that have to be > transformed! Suggestions are more than welcome. I've tried working with > their tech people and it seems that oXygen just isn't capable of handling > what I need to do. 26mb is relatively tiny these days... two things to do: 1. - Give oXygen more memory (google it) You will need at least 512m. and / or 2. - Use Saxon's streaming feature: switch to Saxon EE as the transformer then refactor your transform to use streaming: <xsl:template match="/" name="main"> <output-root> <xsl:for-each select="saxon:stream(doc('file:///path/to/input.xml')/root/repeating-elem)"> ... </xsl:for-each> Here, instead of supplying input xml and stylesheet, the stylesheet gets the input document itself with the doc() call, so you need to change the transform scenario in oXygen to make the xslt is both input and transform. Then, change the path to the input xml, and the xpath of the repeating structure in your xml. Saxon will process each chunk at a time, and never load the entire xml, which means much lower memory use. You can also use a predicate during dev to only process the first 100 or so chunks, to get a faster feedback loop. If you get stuck, post small samples of code and the xml. -- Andrew Welch http://andrewjwelch.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Thread | RE: [xsl] Software, Ginny Wagner | |
Date | [xsl] XSL-List Guidelines, Mulberry Technologie | |
Month |