Forum Moderators: open

Message Too Old, No Replies

Get type of node in XSLT

         

garann

5:59 pm on May 5, 2005 (gmt 0)

10+ Year Member



In my XSLT, I need the code to run through the children of a menu, in order, and do different things depending on the type of child. I think what I need is something like this:


<xsl:for-each select="child::*>
<xsl:if test="{TYPE OF CHILD = menu}">
<xsl:call-template name="..."/>
<xsl:if test="{TYPE OF CHILD = menuItem}">
<xsl:call-template name="..."/>
</xsl:foreach>

But I'm not sure of the syntax to use for the test. Can anyone help?

Thanks!

garann

6:38 pm on May 5, 2005 (gmt 0)

10+ Year Member



Nevermind, found it on my own. In case anyone else is interested, it's:


<xsl:if test="name()='menuItem'">