If in your Xml each node that corresponds to a page has a unique id you
should be able to do the "filtering" along with the transformation all in
the XSLT.
For example.
Step 1: Pass unique Id of the current page to the Xslt as a parameter.
Step 2: Using the parameter in XPath to find the node corresponding to
current page & do <xsl:apply-templates> on it.
Step 3: In the <xsl:template> node for the current page, generate HTML for
menu of current page. Then use the "parent() " XPath function, to locate the
parent node & do <xsl:apply-templates> on the parent.
Step 4: In the <xsl:template> for parent, generate HTML for menu of the
parent & recursively use the "parent()" function to do <xsl:apply-templates>
-Naraen
---------------------------------------------
"darrel" <no*****@hotmail.com> wrote in message
news:Oz**************@TK2MSFTNGP10.phx.gbl...
I'm still struggling to figure out the big-picture concept of how to go
about building a web site menu from an xml file.
The XML file contains the full site structure (the site map, so-to-speak).
Based on the current page of the site, I want to be able to do the
following:
get node that pertains to current page
get node's siblings
get node's parents
get node's parents siblings
repeat until top node...
Pass this filtered XML to an XSLT file
import xhtml result into my usercontrol to display on page
I asked this yesterday but was a bit too wordy I think. Does the above
sound like the correct way to go about doing things? If so, how dows one best
sort the XML to pull out a subset?
-Darrel