Having finally being able to reproduce the problem on another workstation, I'm really dumbfounded. Can any of you spot anything out of the ordinary (possibly a known bug) in the stylesheet below that could case renegade memory usage?
I'll look more into Xalan versions etc and report back later. On the workstation that had the mem problems I've done a succesful run using xalan-2.2.14.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="../common.xsl"/>
<xsl:output encoding="iso-8859-1"/>
<xsl:template match="users"><xsl:apply-templates select="user"/></xsl:template>
<xsl:template match="user"><xsl:variable name="pos" select="position()"/>CCS_ACCOUNT,"<xsl:value-of select="@id"/>","<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="name/first"/></xsl:with-param></xsl:call-template>","<xsl:value-of select="name/last"/>","<xsl:value-of select="address"/>","<xsl:value-of select="zip"/>", "<xsl:value-of select="phones/work"/>","<xsl:value-of select="phones/fax"/>","<xsl:value-of select="mail"/>","<xsl:value-of select="password"/>","<xsl:apply-templates select="registered"/>","<xsl:apply-templates select="active"/>",<xsl:value-of select="1000+$pos"/><xsl:text>
</xsl:text><xsl:value-of select="1000+$pos"/>,cv,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="cv"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,sex,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="sex"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,cellular,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="cellular"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,title,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="title"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,slogan,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="slogan"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,companywww,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="companywww"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,birthday,"<xsl:apply-templates select="birthday"/>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,list,"<xsl:choose><xsl:when test="list">Y</xsl:when><xsl:otherwise>N</xsl:otherwise></xsl:choose>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,imageurl,"<xsl:value-of select="imageurl"/>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,homepage,"<xsl:value-of select="homepage"/>"<xsl:text>||
</xsl:text>
<xsl:value-of select="1000+$pos"/>,company,"<xsl:call-template name="prepareLoad"><xsl:with-param name="string"><xsl:value-of select="company"/></xsl:with-param></xsl:call-template>"<xsl:text>||
</xsl:text>
</xsl:template>
<xsl:template match="birthday"><xsl:choose><xsl:when test="string"><xsl:value-of select="string"/></xsl:when><xsl:otherwise><xsl:value-of select="year"/><xsl:text>-</xsl:text><xsl:value-of select="month"/><xsl:text>-</xsl:text><xsl:value-of select="day"/></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="male">M</xsl:template> <xsl:template match="female">F</xsl:template>
<xsl:template match="registered"><xsl:apply-templates select="date"/><xsl:text> </xsl:text><xsl:apply-templates select="time"/></xsl:template>
<xsl:template match="active"><xsl:apply-templates select="date"/><xsl:text> </xsl:text><xsl:apply-templates select="time"/></xsl:template>
<xsl:template match="date"><xsl:apply-templates select="day"/>-<xsl:apply-templates select="month"/>-<xsl:apply-templates select="year"/></xsl:template>
<xsl:template match="time"><xsl:apply-templates select="hours"/>:<xsl:apply-templates select="min"/>:<xsl:apply-templates select="sec"/></xsl:template>
</xsl:stylesheet>
And the imported template:
<xsl:template name="prepareLoad">
<xsl:param name="string" />
<xsl:choose>
<xsl:when test="contains($string, '"')">
<xsl:value-of select="substring-before($string, '"')" /><xsl:text>""</xsl:text>
<xsl:call-template name="prepareLoad">
<xsl:with-param name="string" select="substring(substring-after($string, '"'), 1)" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
