am trying to use an expand collapse method by nodes and there are 2 levels to my xml that is incorporated in the stylesheet. How do I differentiate between nodes on which to expand and collapse is my stylesheet, now i just need to figure out how to expand and collapse different levels within. I already have the java to expand and collapse, I can collapse/expand the whole tree but not w/ in levels. I am very novice to this(as u could probably tell) Any ideas....

<xtags:context select="//Content">
<Sitemap RAccess="*" WAccess="NoOne" Owner="NoOne">
String sitemapxml = (String)cm.get("Sitemap","XmlData");
sitemapxml = sitemapxml.substring(sitemapxml.indexOf("<?xml") + 5);
sitemapxml = sitemapxml.substring(sitemapxml.indexOf("?>") + 2);

<table width=200 border=0><tr><td>
<xtags:variable select="//Content/Sitemap/Content/Page/Page[contains(Caption,'Home Page')]/Page" id="subtree" type="list"/>
<xtags:stylesheet context="<%= subtree %>">
<xtags:template match="text()|@*"/>
<xtags:template match="Page">
<table border=0 cellspacing=0 cellpadding=0>
<tr><td colspan=2>
<a href="<xtags:valueOf select="Url"/>" target="<xtags:valueOf select="Target"/>"><xtags:valueOf select="Caption"/></a>
<td width="10"> </td>
<% subtree = null; %>
<xtags:remove select="//Sitemap"/>