Traverse the tree and get all the element name

Subject: Traverse the tree and get all the element name
From: Honglin Su <hosu@xxxxxxxxxxx>
Date: Thu, 12 Aug 1999 14:46:15 -0400
Hi, there,

I want a XSL stylesheet to traverse the tree and get all the element
name, I tried this one:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0";>

<xsl:template match="/">
 <xsl:apply-templates/>
</xsl:template>
<xsl:template match="*">
 <xsl:value-of select="name(.)"/>
</xsl:template>
</xsl:stylesheet>

But it only gives the root element, while I want ALL element name.
What's wrong with it? or any tips?

Thank you!

Honglin


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread