[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Saxon versus Xalan implementations of evaluate()

Subject: Re: Saxon versus Xalan implementations of evaluate() extension function?
From: Arian Hojat <arianhojat2000@xxxxxxxxx>
Date: Wed, 6 Jul 2005 21:50:17 -0700 (PDT)
xalan evaluate
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).

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 )


Arian.


--- Andrzej Taramina <andrzej@xxxxxxxxxxx> wrote:

> I'm trying to get a large application to run using
> Saxon 8.4 rather than Xalan, which it
> uses currently, since a large chunk of cpu is being
> burned in the xsl transform step.
> Figured Saxon is usually a lot more efficient than
> Xalan in that regard.
> 
> But there seems to be a difference in the
> functionality of xalan:evaluate versus
> saxon:evaluate.
> 
> For example:
> 
>    xalan:evaluate( concat( '$', @varname ) )
> 
> works fine.  It uses the value of the @varname
> attribute (say 'xyz' ) and then returns the
> value of the variable $xyz.  Saxon dies on this
> construct with an exception that looks like:
> 
> net.sf.saxon.trans.DynamicError: Static error in
> XPath expression supplied to
> saxon:evaluate: XPath syntax error at char 10 in
> $xyz:
> 
> Similarily, I can do a
> 
>    xalan:evaluate( concat( '$data/', @xpathValue ) )
> 
> But Saxon throws the DynamicError exception.
> 
> Seems that Saxon doesn't support variable bindings
> in the evaluate call.  Strange
> oversight (IMNSHO) since the exslt dyn:evaluate
> specifies that it will support variable
> bindings.
> 
> Any workarounds?  Any plans for Saxon 8.5 to support
> variable bindings for the evaluate()
> function?
> 
> Thanks for any/all advice.  If I can't resolve this,
> it will kill our ability to switch to
> Saxon. ;-(
> 
> ....Andrzej
> 
> Chaeron Corporation
> http://www.chaeron.com
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.