webjay <ja***********@gmail.comwrote in
<11*********************@v3g2000hsg.googlegroups.c om>:
I need to select a Xpath that consists of a path plus a
variable. Like this:
<xsl:value-of select="concat($path, $num)" />
The above will return the concatenated string and not the
value from the xpath.
So I guess I need something like <xsl:value-of
select="eval(concat($path, $num))" /but can not make it
work.
You can't do that with XSLT1. EXSLT provides dyn:evaluate(),
but it's non-standard. Therefore processor support may
vary, up to and including blowing up your freezer when you
try to invoke it.
Please note that a need for eval() often indicates a design
problem or taking the wrong turn while trying to solve your
actual problem. If you restated your problem in terms
of 'what-I-need-to-achieve' instead
of 'what-functionality-I-need-in-the-language' denizens of
the group might be able propose a more elegant solution.
--
It is rare to find learned men who are clean, do not stink,
and have a sense of humour. -- Liselotte in a letter to
Sophie, 30 Jul 1705