Re: [xsl] Can I find out the names of elements in a tree?

Subject: Re: [xsl] Can I find out the names of elements in a tree?
From: "Joerg Heinicke" <joerg.heinicke@xxxxxx>
Date: Mon, 7 Jan 2002 22:02:42 +0100
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>&#10;</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


Current Thread