|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameters in XPath
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








