Hi,

I'm currently looking at a related bug (4858) which may or may not be the
same problem you're experiencing, and I think I have a fix. Could I
possibly get a copy of the stylesheets and source documents you're using so
I can test the fix on your problem (or alternatively, I can send you a
patch)?

Thanks,
Gordon

----
Gordon Chiu
[EMAIL PROTECTED]


                                                                                
                                                       
                      Christian                                                 
                                                       
                      Wolfgang Hujer           To:       Simon Kitching <[EMAIL 
PROTECTED]>                                        
                      <Christian.Hujer@        cc:       [EMAIL PROTECTED]      
                                            
                      itcqis.com>              Subject:  Re: Xalan (or Xerces, 
Ant) has a huge memory consumption                      
                                                                                
                                                       
                      12/15/2002 05:51                                          
                                                       
                      PM                                                        
                                                       
                                                                                
                                                       
                                                                                
                                                       



Hello Simon, dear list members,

Am Sonntag, 15. Dezember 2002 23:26 schrieb Simon Kitching:
> I notice the example code repeatedly calls document('../conf/site.xml').
Yeah. And it's not the only place in the stylesheet...

> Question for XALAN developers: Does the "document" function recognise
> when it a document has previously been loaded, or does it reparse the
> specified document each time?
I believe it does.

> If it doesn't (and I suspect this is the case), then you are loading,
> parsing, and generating a complete in-memory representation of
> "site.xml" 4 times in the fragment below. This might be the cause of the
> unexpectedly large memory usage, particularly if site.xml is a large
> document.
>
> I suggest you add the following at global level:
>
> <xsl:variable name="sitedoc" select="document('../conf/site.xml')"/>
>
> then use code like
>
> <a href="{$sitedoc/.......}">
>
> Hope this helps,
>
> Simon
I tried. Memory consumption has not decreased.
It's still approx. 100 MBytes after the 11th file.

But readability of the stylesheet has significantly increased :-)


Bye
--
ITCQIS GmbH
Christian Wolfgang Hujer
Gesch�ftsf�hrender Gesellschafter
Telefon: +49  (0)89  27 37 04 37
Telefax: +49  (0)89  27 37 04 39
E-Mail: [EMAIL PROTECTED]
WWW: http://www.itcqis.com/



Reply via email to