|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can I find out the names of elements in a tree?
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@xxxxxxxxxxxxxxx>
> 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
|
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
|

Cart








