xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Bowditch <bowditch_ch...@hotmail.com>
Subject Re: Could not find function: replace
Date Mon, 02 Apr 2007 13:31:15 GMT
Johan Johansson wrote:

> Hi,
>  
> I'm trying to use the XSL 2.0 function replace() but i just got this error:
>  
> javax.xml.transform.TransformerException: Could not find function: replace
>  
> the code:
> <xsl:value-of select="normalize-space(replace(../kund/brevnamn,'Å 
> ','%A'))" />
>  
> Any suggestions?

If you are running the FOP v0.93 binary distribution "Out of the Box" 
then it is shipped with the XSLT Transformation engine Xalan-J 2.7.0, 
which does not support XSL 2.0 only XSL 1.0. I believe Saxon supports 
XSL 2.0.

There are 2 possible solutions.

1) Instead of passing FOP the XSLT+XML, generate the XSL-FO using Saxon 
(or any XSLT Tranform engine of your choice) in a first step and pass 
the resulting XSL-FO to FOP to process in a second step. This doesn't 
have to be as inefficient as it sounds if you are using FOP in an 
embedded application as you can pipe the SAX events from the XSLT engine 
directly to FOP.
2) tell FOP to use Saxon instead of Xalan. An explanation of how to do 
this has been posted up manay times before. A quick search of the 
archives revealed this post:

http://marc.info/?l=fop-user&m=117321155708989&w=2

Chris





---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message