SaxonHE 9 to create multiple files with XSLT from a very large file

Wednesday, November 4, 2015

I'm using the information from Splitting XML into multiple files with XSLT to split an XML file that's 143M in size. If I manually take a handful of records out of the file, the following template works as suggested from the above link.



    <xsl:template match="/">
<xsl:for-each select="Report_Data/Report_Entry">
<xsl:result-document method="xml" href="record-{position()}.xml">
<xsl:copy-of select="."/>
</xsl:result-document>
</xsl:for-each>
</xsl:template>


My problem seems to be when I apply the XSLT to the larger document, which doesn't create the files, and outputs only the xml header when no output is provided when the files are created.



$ java -Xmx512M -jar /usr/local/bin/saxon9he.jar largefile.xml transform.xsl
<?xml version="1.0" encoding="UTF-8"?>


I'm working in Cygwin and using 32 bit Java v1.7.0_55.



Is the file just too large for the HE version of Saxon? Is there some other setting or reason that I'm getting output, rather than a collection of files?

0 comments:

Post a Comment