xsl-list
[Top] [All Lists]

[xsl] Subject: Expression handed to saxon:evaluate can't access variables

2009-09-24 06:57:45
I'm trying to design a transform that needs to evaluate an expression taken
from the XML input file. I'm trying to use the saxon:evaluate function to
do this, as follows:
<xsl:value-of select="saxon:evaluate(Caption)"/>

The problem seems to be that my expression (which is in the Caption element
of my source file):
normalize-space(concat($parentnode/Caption,' ',$tablenode/Caption))

contains some references to variables. When I try to run this, it reports
"Static error in XPath expression supplied to saxon:evaluate: Undeclared
variable in XPath expression: $parentnode".

When I put the expression directly into my XSL file like this:
<xsl:value-of select="normalize-space(concat($parentnode/Caption,'
',$tablenode/Caption))"/>

it works.

How can I get this sort of expression supplied from the source file to
evaluate properly?

Many thanks - Rowan



--------------------------------------------------------------------
mail2web.com - Microsoft® Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>