Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6862915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:43:08+00:00 2026-05-27T02:43:08+00:00

I am working under java application which uses XSLT transformation. I have a lot

  • 0

I am working under java application which uses XSLT transformation. I have a lot of document() calls in it, so it is possible to have java.lang.OutOfMemory exception (which I actually have), because after each call of document() function the document is cached.

At http://xml.apache.org/xalan-j/faq.html#faq-N102F9 I read that it is possible to
increase heap memory size which is not the solution in my case. I also tried to use incremental transform which seems to be not supported.

So, is there any possibility to turn off document caching in jaxp while working with document() function?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:43:08+00:00Added an answer on May 27, 2026 at 2:43 am

    Like user1066037’s answer, hopefully you can switch to Saxon. Saxon has an extension called saxon:discard-document. It’s available in either the PE or EE editions or Saxon-B. Search for “Saxon-B” here: http://saxon.sourceforge.net/

    From the Saxon documentation:

    saxon:discard-document()

    saxon:discard-document($doc as document-node()) ==> document-node()

    This function removes a document from Saxon’s internal document pool.
    The document remains in memory for the time being, but will be
    released from memory by the Java garbage collector when all references
    to nodes in the document tree have gone out of scope. This has the
    benefit of releasing memory, but the drawback is that if the same
    document is loaded again during the same transformation, it will be
    reparsed from the source text, and different node identifiers will be
    allocated. The function returns the document node that was supplied as
    an argument, allowing it to be used in a call such as
    select=”saxon:discard-document(document(‘a.xml’))”.

    If you need an example of how to use saxon:discard-document, let me know and I can post one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a huge legacy Java application, with a lot of handwritten stuff,
We have an issue related to a Java application running under a (rather old)
I am currently working on a small desktop Java application which will track various
I have a Java application which should run on a server machine in the
While working on a Java application under Mac OS X (Lion, 10.7.2, Java version
I have an Android application (java) that was working fine when compiled with the
I'm working with JInternalFrame's under Mac OS X Java 5 and when maximizing a
So, I'm working under the assumption that we have typed languages because we make
I am currently working on a Java EE project. I have successfully developed a
I'm working on an EclipsePluginProject. I don't have much(nearly nothing) experience with UIs under

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.