<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="/Tree">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="TreeNode">
<li>
<a href="javascript:function(){return false};"></a>
<xsl:choose>
<xsl:when test="@NodeImgSrc">
<img><xsl:attribute name="src"><xsl:value-of select="@NodeImgSrc" /></xsl:attribute></img>
</xsl:when>
<xsl
therwise>
<img src="leaf.gif" />
</xsl
therwise>
</xsl:choose>
<span>
<xsl:attribute name="id"><xsl:value-of select="@NodeId" /></xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="@Title" /></xsl:attribute>
<xsl:choose>
<xsl:when test="@Href">
<a>
<xsl:choose>
<xsl:when test="@Target">
<xsl:attribute name="target"><xsl:value-of select="@Target" /></xsl:attribute>
</xsl:when>
<xsl
therwise>
<xsl:attribute name="target">fraContent</xsl:attribute>
</xsl
therwise>
</xsl:choose>
<xsl:attribute name="tabIndex">-1</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="@Href" /></xsl:attribute>
<xsl:value-of select="@Title" />
</a>
</xsl:when>
<xsl
therwise>
<xsl:value-of select="@Title" />
</xsl
therwise>
</xsl:choose>
</span>
</li>
</xsl:template>
<xsl:template match="TreeNode[* or @NodeXmlSrc]">
<li>
<a href="javascript:function(){return false};"></a>
<xsl:choose>
<xsl:when test="@NodeImgSrc">
<img><xsl:attribute name="src"><xsl:value-of select="@NodeImgSrc" /></xsl:attribute></img>
</xsl:when>
<xsl
therwise>
<img src="collapse.gif" />
</xsl
therwise>
</xsl:choose>
<span>
<xsl:attribute name="xmlsrc"><xsl:value-of select="@NodeXmlSrc" /></xsl:attribute>
<xsl:attribute name="id"><xsl:value-of select="@NodeId" /></xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="@Title" /></xsl:attribute>
<xsl:choose>
<xsl:when test="@Href">
<a>
<xsl:choose>
<xsl:when test="@Target">
<xsl:attribute name="target"><xsl:value-of select="@Target" /></xsl:attribute>
</xsl:when>
<xsl
therwise>
<xsl:attribute name="target">fraContent</xsl:attribute>
</xsl
therwise>
</xsl:choose>
<xsl:attribute name="tabIndex">-1</xsl:attribute>
<xsl:attribute name="href"><xsl:value-of select="@Href" /></xsl:attribute>
<xsl:value-of select="@Title" />
</a>
</xsl:when>
<xsl
therwise>
<xsl:value-of select="@Title" />
</xsl
therwise>
</xsl:choose>
</span>
<ul><xsl:apply-templates /></ul>
</li>
</xsl:template>
<xsl:template match="@Target">
<xsl:copy><xsl:value-of /></xsl:copy>
</xsl:template>
<xsl:template match="/TreeNode">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="TreeNode/Tree">
<xsl:apply-templates />
</xsl:template>
</xsl:stylesheet>