[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Name function in XSL
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: 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
|
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
|