This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Can I find out the names of elements in a tree?
- From: "Joerg Heinicke" <joerg dot heinicke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 7 Jan 2002 22:02:42 +0100
- Subject: Re: [xsl] Can I find out the names of elements in a tree?
- References: <3c39d65b.49a1.0@telusplanet.net>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Khalid,
Jeni, Michael & Co. are so deepened in their discussions about the 2.0
working drafts, that they forget to answer the easy questions ;-) I think
name() is the thing that you have been searching for.
<xsl:template match="root">
<xsl:apply-templates select="*"/>
</xsl:template>
<xsl:template match="*">
<xsl:value-of select="name()"/>
<xsl:text> </xsl:text>
<xsl:apply-templates select="*"/>
</xsl:template>
Regards,
Joerg
----- Original Message -----
From: "Khalid" <k_ali@telusplanet.net>
> If yes then can some on help me find out how?
> suppose the exml doc looks like the following
> <root>
> <first>
> <second>
> <third>
> <and-so-on>
> </and-so-on>
> </third>
> </second>
> </first>
> </root>
>
> <xsl:template match = "root">
> and in here I want to find out the names of all the nodes in a display
able
> manner i.e one name on each line or something
>
> </xsl:template
>
> Thanks
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list