[xslt] "document() function memory usage"


I'm trying to transform the W3C DOM-Test-Suite to Delphi. Doing this I 
have a stylesheet that loads about 520 XML files (2-4 KB) in a loop and 
processes them. Since the transformation eats all the memory on my test 
machine (256 MB real memory, 630 MB virtual memory), the question arises 
if the documents loaded by the following construct will be released on 
transformation end only:

<xsl:for-each select="*[local-name() = 'suite.member']">
   <xsl:apply-templates select="document(@href)" />

(Note: the output method "text" is used; the transformation runs 
smoothly if only a few tests are processed)

If they are released at transformation end only, could there be any way 
of implementing destruction of no more used documents, if 
xsl:apply-templates has been processed?

Do some other explanations come to mind why this transformation uses so 
much memory?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]