[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to transform a huge XML-file (memory-saving)?

Subject: How to transform a huge XML-file (memory-saving)?
From: news@xxxxxxxxxxx
Date: Tue, 9 Aug 2005 15:49:11 +0200
huge xml file
Hello List,

i'm looking for a solution to handle the xslt-transformation of huge data
files.
If i try to process a 176 mb XML-file with saxon8, the java enviroment uses
a lot of main-memory - round about 1 gb.
This XML-file contains a always repeating block of a structure like this:

    <OBJECT R='XMLEXPBE'>
      <AUFNR>0000463105</AUFNR>
      <AUFDAT>28.11.2000</AUFDAT>
      <FALNR>0200036273</FALNR>
      <MAT>EBLUT</MAT>
      <ANFO>BG</ANFO>
      <UNT>AB0</UNT>
      <ERG>A</ERG>
      <USER>JO</USER>
    </OBJECT>

To process this XML-structure, i used a normal template structure like this:

<xsl:template match="/">  
  <!--<xsl:call-template name="XmlInfo"/>-->  
  <xsl:apply-templates select="//OBJECT" mode="Bestimmungen"/>  
</xsl:template>

<xsl:template match="OBJECT" mode="Bestimmungen">
 
<xsl:text>MSH|^~\&amp;|||||||ZBM|</xsl:text><xsl:text>&#13;&#10;</xsl:text>
 ...........
</xsl:template>


I expect to get a much larger data-file soon. So i think, i will get a
problem with the main memory capacity.
To split the file isn't a possibility, because i have to link between the
data-blocks.

Has anybody an idea, whether an more effective (less memory) way of
programming exists?

I tried to use <xsl:key ...> and the key()-function to built an index. But
it doesn't fit in the <xsl:template ...> - enviroment.
Is it possible to bring both concepts together?

Thanks a lot!
Andrej.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.