logo       

Large XML-files: msg#00005

Subject: Large XML-files
I'm trying to create pdf-files out of large xml-files by using FOP. The largest 
xml-file is about 4 MB. As you can imagine I get an OutOfMemory-Error. 
Increasing the JVM memory size is no solution because the machine starts 
swapping. 

Can you help me to create page sequences with about 100 (more or less) items?

my XML-files look like this:

<data>
  <head>
  .... some informations
  </head>
  <list nr="1">
    <item1>
      <subitem1/>
      <subitem2/>
      <subitem3/>
      <subitem4/>
    </item1>
    <item2>
      ...
    </item2>
    ...
    about 19000 items more
  </list>
  <list nr="2">
  ... like above
  </list>
  ...
</data>

I want the pages look like this:

-------------------------------
headerinformation        page
-------------------------------
Nr: 1
  subitem1 subitem2 ... (for each item)
  subitem1 subitem2 ...
  subitem1 subitem2 ...

Nr: 2
  subitem1 subitem2 ... (for each item)

Currently I'm using this xsl-file:

<xsl:template match="data">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
    <fo:layout-master-set>
      <fo:simple-page-master master-name="all"
        page-height="29.7cm" page-width="21cm"
        margin-top="2cm" margin-bottom="2cm" 
        margin-left="2cm" margin-right="2cm">
        <fo:region-body margin-top="2.5cm" margin-bottom="0cm"/>
        <fo:region-before extent="2.5cm"/>
      </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-reference="all" format="1">
      <fo:static-content flow-name="xsl-region-before">
        <fo:block text-align="start" font-size="10pt" font-family="sans-serif" 
line-height="1em + 2pt">
          <xsl:apply-templates select="head"/>
        </fo:block>
      </fo:static-content>
      <fo:flow flow-name="xsl-region-body">
        <xsl:apply-templates select="list"/>
      </fo:flow>
    </fo:page-sequence>
  </fo:root>
</xsl:template>

The templates "head" and "list" are defined in separate sections.
______________________________________________________________________________
Sie haben mehr zu sagen als in eine SMS passt? Mit WEB.DE FreeMail ist
das jetzt kein Problem mehr! http://freemail.web.de/features/?mc=021182




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe