[xsl] Dynamic XPath

Subject: [xsl] Dynamic XPath
From: "Philip Fitzsimons" <pfitzsimons@xxxxxxxxxxx>
Date: Fri, 23 May 2003 15:08:42 +0100
I want to create an XSLT expressions so that I can vary which nodes I
I can't use [name() = $nodeName] because the depth of the path may change -
and I want to use paths not nodenames...

What I would like to do is:
	<!--<xsl:variable name="dynamicPath" select="/document/*[position()
= 2]" />-->
	<xsl:variable name="dynamicPath"
select="/document/section/keep/pear" />
	<xsl:variable name="textContent" select="{$dynamicPath}/text()" />
Which is not valid :( - so how can I create a dynamic path? Is it possible?
I'm using MSXML 4.0 under .Net

		first section
			first sub-section
		<house sid="1.2">
			first sub-section
		<castle sid="1.3">
			first sub-section

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread