Convert XML to a UL Tree Using XSLT

I spent a good 30 minutes hunting for this on the web this afternoon. Eventually I just wrote it myself.

The following XSLT will convert XML to a tree of <ul>and <li> items. The element names will be rendered within <strong> tags.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<ul id="certificateData">
<xsl:apply-templates select="./*"/>
</ul>
</xsl:template>
<xsl:template match="*">
<li class="closed">
<strong>
<xsl:value-of select="local-name()"/>
</strong>
<xsl:choose>
<xsl:when test="count(./*) > 0">
<ul>
<xsl:apply-templates select="./*" />
</ul>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="."/>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:template>
</xsl:stylesheet>