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/