[XSL-LIST Mailing List Archive Home]
[Reply To This Message]
Re: Dynamic XPath expression (I know it doesnt work in
Subject: Re: Dynamic XPath expression (I know it doesnt work in XSLT1.0)|
From: Matt Dittbenner <mbditt@xxxxxxxxxxxxxxxxx>
Date: Thu, 26 Aug 2004 14:12:18 -0500
We had "tested" the dyn:evaluate function in xsltproc. In our "tests" it
seemed to almost double the time it took.
We just "tested" the saxon:evaluate function (in saxon) and it doesn't
noticably increase the parse time. That pleases me.
P.S....this is driving me insane
Josh Canfield wrote:
"since it increases the parse time so much...."
I'm very surprised by this statement, do you have any data that
supports the statement? Specifically that the parse time is increased?
Doing any sort of dynamic compilation of xpath is going to increase
the run time of the transformation. Using the built-in evaluate
functions seems like it would be the most efficient solution...
On Thu, 26 Aug 2004 12:38:47 -0500, Matt Dittbenner
After some pretty exhaustive searching on the web, I have decided to
join the list. I have noticed in the archives that more than one person
has had the same issue as I have...how to create an XPath expression
dynamically (from a variable, etc). The answer to these questions was to
use any of the available *:evaluate functions. I would like to try to
avoid that, since it increases the parse time so much....and that is not
My question is if there is any other way to accomplish this, for example
using XSLT2.0. I have found little information about the newer XSLT
recommendation, and the information I have found is fairly cryptic (at
least to me). Here is a more detailed example of what I am trying to do:
<tag2>Data I want...</tag2>
<xsl:variable name="path" select="/p/getContent/@path" />
In an ideal world, stylesheet.xsl would use the XPath expression from
the attribute in template.xhtml to access another document (doc.xml) and
then grab the data located there. How do I do this?!
Thanks in advance,
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