[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Name function in XSL

Subject: Re: Name function in XSL
From: "Simon Kelly" <kelly@xxxxxxxxxx>
Date: Thu, 8 May 2003 09:57:16 +0200
xsl go to next node
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.