Project

Profile

Help

Extension function unknown

Added by Anonymous over 15 years ago

Legacy ID: #7260150 Legacy Poster: Lina Kittilsen (litago)

Hi, I am trying to use a saxon extention function, but I keep getting XPathProcessorException Extension function unknown (I have tried saxon:parse, saxon:evaluate ++). I know that the saxon*.jar file which contains the class "net.sf.saxon.functions.Parse" is in the class path. Can anyone please help me? This is my xsl file: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="xmlContent" select="saxon:evaluate(something)" xmlns:saxon="http://saxon.sf.net/&quot;/> </xsl:template> </xsl:stylesheet> This is the exception: Caused by: org.apache.xpath.XPathProcessorException: Extension function http://saxon.sf.net/ : evaluate is unknown at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:241) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:461) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:233) at org.apache.xpath.XPath.execute(XPath.java:308) Kind regards, Lina


Replies (1)

RE: Extension function unknown - Added by Anonymous over 15 years ago

Legacy ID: #7260391 Legacy Poster: Michael Kay (mhkay)

The stack trace shows that you are not running Saxon at all, you are running Xalan. It seems you are using the JAXP XPath interface. Make sure you load the Saxon version of the XPath factory, class name net.sf.saxon.xpath.XPathFactoryImpl. The safest way of achieving this is to instantiate it directly, rather than relying on the JAXP classpath search. Another way is to set the system property javax.xml.xpath.XPathFactory.

    (1-1/1)

    Please register to reply