(B
(B
(B
(BHi Kit,
(B
(BWhenever you have a recursive template which is called so many times, you
(Brisk exhausting the processor stack, which is probably what is happening
(Bhere. Depending on your platform, you can rebuild Xalan with a large stack
(Bto see if that helps.
(B
(BHowever, it looks like what you're trying to do can be accomplished without
(Busing a recursive template. If you can post a small, complete, sample
(Binput and your expected output, it would easier to determine if that's
(Bpossible.
(B
(BDave
(B
(B
(B
(B|---------+--------------------------->
(B| | $BNS(B $B;R?D(B |
(B| | <[EMAIL PROTECTED]|
(B| | mail.com> |
(B| | |
(B| | 07/02/2003 03:38|
(B| | AM |
(B|---------+--------------------------->
(B
(B>---------------------------------------------------------------------------------------------------------------|
(B |
(B |
(B | To: [email protected]
(B |
(B | cc: (bcc: David N Bertoni/Cambridge/IBM)
(B |
(B | Subject: about using recusive function in xalan
(B |
(B
(B>---------------------------------------------------------------------------------------------------------------|
(B
(B
(B
(BHi,
(BCan somebody tell me whether there is a limitation in size of the xml file
(Bin xalan, if you wish to write out a recursive function, i have a xml about
(B9 mb, with the following format:
(B
(B<cf>
(B<orginial_file>
(B<f>
(B<p no="1">
(B<a>
(B<ab>some text</ab>
(B<ac>some text</ac>
(B</a>
(B<b>some text</b>
(B<c>some text</c>
(B</p>
(B<p no="2">
(B<a>
(B<ab>some text</ab>
(B<ac>some text</ac>
(B</a>
(B<b>some text</b>
(B<c>some text</c>
(B</p>
(B...
(B<p no="8000">
(B<a>
(B<ab>some text</ab>
(B<ac>some text</ac>
(B</a>
(B<b>some text</b>
(B<c>some text</c>
(B</p>
(B</f>
(B</original_file>
(B<new_file>
(B<f>
(B.... like above
(B</f>
(B</new_file>
(B
(Bi have try and use the following template to process it:
(B<xsl:template match="cf">
(B<xsl:call-template name="Document">
(B <xsl:with-param name="doc1" select="original_file/f/p"/>
(B <xsl:with-param name="doc2" select="new_file/f/p"/>
(B </xsl:call-template>
(B</xsl:template>
(B
(B<xsl:template name="Document">
(B <xsl:param name="doc1"/>
(B <xsl:param name="doc2"/>
(B <xsl:if test="count($doc2)">
(B <tr>
(B <td><xsl:apply-templates select="$doc1[1]"/></td>
(B <td><xsl:apply-templates select="$doc2[1]"/></td>
(B </tr>
(B <xsl:call-template name="Document">
(B <xsl:with-param name="doc1" select="$doc1[position()!=1]"/>
(B <xsl:with-param name="doc2" select="$doc2[position()!=1]"/>
(B</xsl:call-template>
(B</xsl:if>
(B </xsl:template>
(B<xsl:template match="p">
(B<xsl:value-of select="a/ab">
(B</xsl:template>
(B
(BThis template works fine as long as the xml file is relatively small, but
(Bwhen i use this for a larger file (~9mb) it prompt a message of "Unhandled
(BException". so i was wondering, if this is a problem with my template or is
(Bthere is a bug in xalan, thanks for your time.
(BMany thanks
(Bregards
(BKit
(B
(B_________________________________________________________________
$B;HMQ(B MSN Messenger$B!$gPJ~M':[EMAIL PROTECTED]>efXE7(B:
(Bhttp://messenger.microsoft.com/tc