How can I increase the memory for the xslt task from within Ant 1.8.4, not with an environment variable? I am using Saxon by specifying the Saxon jar classpath in this target:

  <target name="commands">
    <xslt in="command-spreadsheet.xml" out="out.xml"
      style="intermed.xsl" force="true">
      <classpath location="${saxon}" />
    </xslt>
  </target>

This transform job crashes with "java.lang.OutOfMemoryError: Java heap space" unless I set ANT_OPTS=-Xmx256m. But I don't want to have to depend on an env variable. Is there a way to increase JVM heap space within the xslt task? I can run this same transform successfully with the java task like this, using the maxmemory attribute to increase the heap space:

  <target name="old">
    <java jar="${saxon}" fork="true" failonerror="true" maxmemory="256m">
      <!-- Source file -->
      <arg value="-s:command-spreadsheet.xml"/>
      <!-- XSLT stylesheet -->
      <arg value="-xsl:intermed.xsl"/>
    </java>
  </target>

There is no maxmemory attribute for the xslt task. I would rather use the xslt task if I can.

Thanks,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to