Subject: Re: [xsl] An efficient XSLT program that searches a large XML document for all occurrences of a string? From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 2 May 2024 13:11:00 -0000 |
Hi Folks,
I have an XSLT program that locates all leaf elements which have the string value 'DNKK'. My program outputs the element and the name of its parent:
<xsl:template match="/"> <results> <xsl:for-each select="//*[not(*)][. eq 'DNKK']"> <result> <xsl:sequence select="."/> <parent><xsl:value-of select="name(..)"/></parent> </result> </xsl:for-each> </results> </xsl:template>
The input XML document is large, nearly 5GB.
When I run my program SAXON throws the OutOfMemoryError message shown below.
To solve the OutOfMemoryError I could add to my heap space (-Xmx) when I invoke Java. But I wonder if there a way to write my program so that it is more efficient (i.e., doesn't require so much memory)?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] An efficient XSLT program tha, Roger L Costello cos | Thread | Re: [xsl] An efficient XSLT program, Bauman, Syd s.bauman |
[xsl] An efficient XSLT program tha, Roger L Costello cos | Date | Re: [xsl] An efficient XSLT program, Martin Honnen martin |
Month |