xsl-list
[Top] [All Lists]

Re: Saxon versus Xalan implementations of evaluate() extension function?

2005-07-07 08:27:01
Adrian suggests:

I think just doing all evaluations in a variable
beforehand should give you a bit more safety to work
in saxon/xalan/both. I was using xalan with the dyn
EXSLT extension and saxon and it seemed to work...
Although when I wanted to make it processor
independant to check beforehand what evaluate to use
like so... <xsl:apply-templates
use-when="function-available(dyn:evaluate)"
select="dyn:evaluate($evalThis)"/>, xalan 1.0
processor seemed to have a problem with the use-when
if this is an issue to work in both. I wasnt sure of a
workaround).

Is dyn:evaluate() availabe in Saxon 8.4? How about Saxon 6.5.4?

but back to the problem, does this work?...
<xsl:variable name="evalThis" select="concat(
'$data/', @xpathValue )" />
... saxon:evaluate( $evalThis )

at worst try this...
<xsl:variable name="evalThis" select="concat( $data,
'/', @xpathValue )" />
... saxon:evaluate( $evalThis )

Won't work, since many times the variable $data is a node set.  Xalan handles 
that fine.
saxon:evaluate won't bind to the variable.

I tried reverting to Saxon 6.5.4 but then kept getting the following exception:

javax.xml.transform.TransformerException: Error in expression : Unexpected 
token EOF in
expression

Anyone know what causes this exception and why Saxon 6.5.4 would throw this 
when Saxon 8.4
and Xalan don't, on the same stylesheet source?

Thanks!

....Andrzej

Chaeron Corporation
http://www.chaeron.com

--~------------------------------------------------------------------
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>
--~--