TreeView Xsl error

GAUSIASON

New Member
I'm trying to transform my xml to use with the MS treeview control. Any time i try to use more than one template or to use call-template i get an error:<BR><BR><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'><BR><xsl:output method="xml" indent="yes" /><BR><BR><xsl:template match="/" name="xTree"><BR><TREENODES><BR> <treenode Text="Menu Items"><BR><BR> <xsl:for-each select="MenuData/MenuGroup/MenuItem"><BR> <xsl:element name="treenode"><BR> <xsl:attribute name="DefaultStyle">background:#CCFF66;border:solid 1px;color:blue;font-size:9pt</xsl:attribute><BR> <xsl:attribute name="HoverStyle">background:#FF66CC;color:brown;font-name;Arial</xsl:attribute><BR> <xsl:attribute name="SelectedStyle">color:red;font-name=Tahoma;font-weight:bold-italic</xsl:attribute><BR> <xsl:attribute name="Text" ><xsl:value-of select="@Label"/></xsl:attribute><BR> <xsl:attribute name="NavigateURL" ><xsl:value-of select="url"/></xsl:attribute><BR> <xsl:attribute name="Target" >_blank</xsl:attribute><BR> <xsl:if test="count(./*) > 0"><BR> <xsl:call-template name="tBlock" /><BR> </xsl:if><BR> </xsl:element><BR> </xsl:for-each><BR><BR> </treenode><BR></TREENODES><BR></xsl:template><BR><BR><xml:template name="tBlock"><BR> <xsl:element name="treenode"><BR> <xsl:attribute name="DefaultStyle">background:#CCFF66;border:solid 1px;color:blue;font-size:9pt</xsl:attribute><BR> <xsl:attribute name="HoverStyle">background:#FF66CC;color:brown;font-name;Arial</xsl:attribute><BR> <xsl:attribute name="SelectedStyle">color:red;font-name=Tahoma;font-weight:bold-italic</xsl:attribute><BR> <xsl:attribute name="Text" ><xsl:value-of select="@Label"/></xsl:attribute><BR> <xsl:attribute name="NavigateURL" ><xsl:value-of select="url"/></xsl:attribute><BR> <xsl:attribute name="Target" >_blank</xsl:attribute><BR> </xsl:element><BR></xml:template><BR><BR></xsl:stylesheet> <BR><BR><BR><BR>Hi Elam, <BR><BR>Without knowing the exact error it's hard to help, but in any event, I'd take a look here:<BR><BR>http://msdn.microsoft.com/workshop/webcontrols/overview/treeview.asp<BR><BR>That should give you a better idea of how the TreeView control uses XSL templates. <BR><BR>Hth, <BR><BR>])ry
 
Back
Top