Subject: Re: [xsl] Name function in XSL From: "Simon Kelly" <kelly@xxxxxxxxxx> Date: Thu, 8 May 2003 09:57:16 +0200 |
You could make the tempalte like this <xsl:template name="ele-to-att"> <xsl:param name="nodeset" /> ... do work on the top node ... if it has no children do work on the next node ... ... else ... <xsl:call-template name="ele-to-att"> <xsl:with-param select="./*" /> </xsl:call-template> ... go to next node ... </xsl:template> It's not the best way to do recursion, as tail recursion is the better option (although there are only a few transformers that support it so it doesn'T really matter) but you really need to try to keep the recurssion tight to stop any bad run time errors. Cheers Simon ----- Original Message ----- From: "Molnar Agnes" <agi@xxxxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, May 08, 2003 10:59 AM Subject: Re: [xsl] Name function in XSL So it's work, but I have an other question. I'd like if this work recursively, so if I have an XLM document with more deep, how can I do this? Thanks again, Agnes Molnár Ágnes ----------------------- Web: http://aghy.uw.hu Icq: 167290967 Tel: +36-20-212-8493 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Name function in XSL, Molnar Agnes | Thread | RE: [xsl] Name function in XSL, Michael Kay |
Re: [xsl] Name function in XSL, Oleg Tkachenko | Date | Re: [xsl] XSL:IF expression, Agnes Kielen |
Month |