(B
(B
(B
(BHi,
(B
(BI believe I already replied to your message on the list.  There will be
(Blimits imposed by the OS, and by the size of the file you are processing.
(B
(BDepending on your platform, you may be able to increase those limits with
(BOS settings, or with compiler settings.
(B
(BOn the other hand, your recursive calls are just emulating iteration.  Is
(Bthere some reason why you cannot re-write your stylesheet to use for-each?
(BIt looks to me like it would be trivial to remove at least one of the
(Bparameters, which would certainly help with the stack limits.
(B
(BDave
(B
(B
(B
(B                                                                                
(B                                                       
(B                      $BNS(B $B;R?D(B                                       
(B                                                                   
(B                      <[EMAIL PROTECTED]         To:      
([email protected]                                                   
(B                      mail.com>                cc:      (bcc: David N 
(BBertoni/Cambridge/IBM)                                           
(B                                               Subject: about using recusive 
(Bfunction in xalan                                         
(B                      07/02/2003 03:38                                          
(B                                                       
(B                      AM                                                        
(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

Reply via email to