For your information: I've been looking the dev mailing list, and it is a frequent question. So the answer is - xalan has to build the in-memory structure - cut your big files into several smaller ones - on-going development is trying to adress this issue - for more information, look at the devel mailing list for "pruning"
Phil, Thank you for your answer, it's a possible way of doing what I want and I'll have to compare it with cutting my big file into several smaller ones. Fabien -----Message d'origine----- De : Phillip Lord [mailto:[EMAIL PROTECTED] Envoy� : vendredi 23 novembre 2001 18:31 � : [EMAIL PROTECTED] Objet : Re: preventing xalan form building the tree structure >>>>> "Fabien" == Azavant, Fabien <[EMAIL PROTECTED]> writes: Fabien> I am trying to transform pretty big XML files with Fabien> xalan. But the transformations are very simple, and once a Fabien> node is closed, it is never visited again. For example, I Fabien> need to aggregate 2 nodes in the source document into 1 node Fabien> in the result document. Fabien> Even with a sax input and sax output, xalan seems to build Fabien> an internal structure to hold the entire document. Whereas I Fabien> do not need that. I thought that the advantage of SAX over Fabien> DOM was that the entire document is not brought into memory. This depends on what the application does with the SAX events or the DOM tree. Both are just interfaces, and neither specify what happens inside the parser or outside it. Fabien> Is there a way to tell xalan not to build an in-memory Fabien> structure of the document ? Fabien> That would be great and I could handle my 1Gb file ! I think the Xalan is always going to build an in-memory representation, although I could be wrong about this (no doubt someone else will tell you a more definitive answer). A moot question here though is if your transformation is so simple, do you really want to be using XSLT. You could just write a small class which performs the operation directly on the SAX stream. That way you can control what is held in memory and what is not. Phil
Ce message contient des informations confidentielles ou appartenant au Cr�dit Lyonnais et est �tabli � l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message, ou des informations qu'il contient, doit �tre pr�alablement autoris�e. Tout message �lectronique est susceptible d'alt�ration et son int�grit� ne peut �tre assur�e. Le Cr�dit Lyonnais d�cline toute responsabilit� au titre de ce message s'il a �t� modifi� ou falsifi�. Si vous n'�tes pas destinataire de ce message, merci de le d�truire imm�diatement et d'avertir l'exp�diteur de l'erreur de distribution et de la destruction du message. This e-mail contains confidential information or information belonging to Cr�dit Lyonnais and is intended solely for the addressees. The unauthorised disclosure, use, dissemination or copying (either whole or partial) of this e-mail, or any information it contains, is prohibited. E-mails are susceptible to alteration and their integrity cannot be guaranteed. Cr�dit Lyonnais shall not be liable for this e-mail if modified or falsified. If you are not the intended recipient of this e-mail, please delete it immediately from your system and notify the sender of the wrong delivery and the mail deletion.
