|
[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: xsl recursion
Subject: Re: xsl recursion
From: Norman Barker <normanb@xxxxxxxxxxxxx>
Date: Wed, 23 Feb 2005 16:50:03 +0000
|
Hi,
thanks for the tip, already tried this, and -Xss1m to change the stack
size from the default of 256k
Norman
Richard Lewis wrote:
This is a bit off topic, but have you tried setting java execution
options to allow more memory to Cocoon?
In Tomcat you need to set:
CATALINA_OPTS="-server -Xms256m -Xmx256m"
Richard
On Wed, 23 Feb 2005 15:46:14 +0000, "Norman Barker"
<normanb@xxxxxxxxxxxxx> said:
Hi,
I am using Xalan and Cocoon to doing try and implement a "divide and
conquer" algorithm for processing very
large XML files. I have a row count of 8400, so I should only have a
depth of log2(8400) (about 12), I keep getting
stack overflow error, and setting -RL with Xalan fails too, I thought
DVC algorithms were supposed to stop this!
Anyway,
<sql:rowset>
<sql:row>
<col1>..</col1>
<col2>..</col2>
</sql:row>
:
:
</sql:rowset>
and the template looks like
where rows are the collection of sql:row above
Any help would be great, thanks,
<xsl:template name="data">
<xsl:param name="rows"/>
<xsl:param name="rowcount" select="count($rows)"/>
<xsl:choose>
<xsl:when test="$rowcount = 1">
<xsl:for-each select="sql:row">
<xsl:for-each select="*">
<xsl:choose>
<xsl:when test="(local-name(.) = 'date') or
(local-name(.) = 'lat') or (local-name(.) = 'lon')"></xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="cntHalf"
select="floor($rowcount div 2)"/>
<xsl:variable name="vValue1">
<xsl:call-template name="data">
<xsl:with-param name="rows"
select="$rows[position() <= $cntHalf]"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="vValue2">
<xsl:call-template name="data">
<xsl:with-param name="rows"
select="$rows[position() > $cntHalf]"/>
</xsl:call-template>
</xsl:variable>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

| Current Thread |
Richard Lewis - 23 Feb 2005 16:36:12 -0000
- Norman Barker - 23 Feb 2005 16:47:27 -0000 <=
Jon Gorman - 23 Feb 2005 16:58:55 -0000
|
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
|
| Atom 0.3 |
|
|