<%@ Register TagPrefix="ie" Namespace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %> |
<FooBar:TreeView runat="server" ... /> |
<form runat="server"> <ie:TreeView runat="server"> <ie:TreeNode Text="Isaac Gibson" Expanded="True"> <ie:TreeNode Text="Birth - 1766" /> <ie:TreeNode Text="Death - 1827" /> <ie:TreeNode Text="Spouse"> <ie:TreeNode Text="Ritty Gibson" /> <ie:TreeNode Text="Married 1789" /> <ie:TreeNode Text="Children"> <ie:TreeNode Text="Phoebe Gibson"> <ie:TreeNode Text="Birth - 1790" /> <ie:TreeNode Text="Death - 1884" /> <ie:TreeNode Text="Spouse"> <ie:TreeNode Text="James K. Mason" /> <ie:TreeNode Text="Married 1819" /> </ie:TreeNode> </ie:TreeNode> <ie:TreeNode Text="John Gibson"> <ie:TreeNode Text="Birth - 1793" /> <ie:TreeNode Text="Death - 1802" /> ...... </ie:TreeNode> </ie:TreeView> </form> |
<?xml version="1.0" encoding="UTF-8"?> <books> <book price="34.95"> <title>Teach Yourself Active Server Pages 3.0 in 21 Days</title> <authors> <author>Mitchell</author> <author>Atkinson</author> </authors> <year>1999</year> </book> <book price="29.95"> <title>Designing Active Server Pages</title> <authors> <author>Mitchell</author> </authors> <year>2000</year> </book> <book price="34.95"> <title>ASP.NET: Tips, Tutorials, and Code</title> <authors> <author>Mitchell</author> <author>Mack</author> <author>Walther</author> <author>Seven</author> <author>Anders</author> <author>Nathan</author> <author>Wahlin</author> </authors> <year>2001</year> </book> <book price="24.95"> <title>ASP Unleashed</title> <authors> <author>Walther</author> </authors> <year>1998</year> </book> </books> |
<TREENODES> <treenode text="..."> <treenode text="..."> </treenode> <treenode text="..." /> ... </TREENODES> |
<?xml version="1.0" encoding="UTF-8"?> <TREENODES> <treenode text="Teach Yourself Active Server_u80 ?ages 3.0 in 21 Days"> <treenode text="Price - $34.95" /> <treenode text="Authors"> <treenode text="Mitchell" /> <treenode text="Atkinson" /> </treenode> <treenode text="Year Published - 2000" /> </treenode> <treenode text="Designing Active Server Pages"> <treenode text="Price - $29.95" /> <treenode text="Authors"> <treenode text="Mitchell" /> </treenode> <treenode text="Year Published - 2000" /> </treenode> 〈/TREENODES> |
<form runat="server"> <ie:TreeView runat="server"> <ie:TreeNode runat="server" Text="ASP.NET Books" Expanded="True" TreeNodeSrc="aspnetbooks.xml" /> </ie:TreeView> </form> |
ASP.NET Books Teach Yourself Active Server Pages 3.0 in 21 Days Designing Active Server Pages ASP.NET: Tips, Tutorials, and Code Programming ASP.NET |
<form runat="server"> <ie:TreeView runat="server"> <ie:TreeNode runat="server" Text="ASP.NET Books" Expanded="True" TreeNodeSrc="aspnetbooks.xml" TreeNodeXsltSrc="aspbooks.xsl" /> </ie:TreeView> </form> |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=@#1.0@#> <xsl:template match="/books"> <TREENODES> <xsl:for-each select="book"> <treenode> <xsl:attribute name="text"> <xsl:value-of select="title" /> </xsl:attribute> <treenode> <xsl:attribute name="text"> Price - $<xsl:value-of select="@price" /> </xsl:attribute> </treenode> <treenode text="Authors"> <xsl:for-each select="authors/author"> <treenode> <xsl:attribute name="text"> <xsl:value-of select="text()" /> </xsl:attribute> </treenode> </xsl:for-each> </treenode> <treenode> <xsl:attribute name="text"> Year Published - <xsl:value-of select="year" /> </xsl:attribute> </treenode> </treenode> </xsl:for-each> </TREENODES> </xsl:template> </xsl:stylesheet> |
<xsl:attribute name="text"> <xsl:value-of select="title" /> </xsl:attribute> |