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

Re: Parameters in XPath

Subject: Re: Parameters in XPath
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 7 Jan 2003 13:26:13 GMT
ergewg
> What I'm trying to accomplish with the Filter
> parameter is to dynamically pass into the stylesheet a
> XPath expression to be evaluated.

Searching the archives for "dynamic" will reveal this to be a FAQ.

Like most other programming languages, XSLT can not evaluate a string
as an expression and doesn't have expressions as first class objects, so
you can not have an expression valued variable.

Some systems (xalan, saxon,...) have an evaluate extension function that
will evaluate a string as an xpath expression.

Alternatively many API allow you to pass in the node set (selected by an
XPath) rather than the xpath expression.

so then you'd have
<xsl:param name="nodes"/>

<xsl:apply-templates
select="$nodes"/>


and you'd set the value of nodes to be the node set selected by
/sdfa/sgag/ergewg/ergwe
using (say) an XPath interface to a DOM.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.