[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Dynamic XPath

Subject: Dynamic XPath
From: "Philip Fitzsimons" <pfitzsimons@xxxxxxxxxxx>
Date: Fri, 23 May 2003 15:08:42 +0100
msxml dynamic xpath
I want to create an XSLT expressions so that I can vary which nodes I
select,
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

<document>
	<section>
		first section
		<keep>
			first sub-section
			<apple>
			</apple>
			<pear>
			</pear>
		</keep>
		<house sid="1.2">
			first sub-section
			<fish>
				<jumping>hello</jumping>
			</fish>
			<dog></dog>
		</house>
		<castle sid="1.3">
			first sub-section
		</castle>
	</section>
</document>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.