The first two things to try are:

(a) add "java:" to the front of the namespace: java:com.ncr.esb.sql.XConnection

(b) run with the -TJ option for detailed diagnostics

Michael Kay
Saxonica

On 28/06/2011 15:29, P, Habin wrote:
Hi,

      

Issue: stylesheet which was working with saxon 8.4 is throwing error in saxon 8.9.External java methods are called inside the stylesheet which are giving the errors.

 

Background:

 

We are calling the methods of com.ncr.esb.sql.XConnection class.This class and the related classes are packaged as jar and is present in the classpath.

Class is declared in name space as  below :

 

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:xs=http://www.w3.org/2001/XMLSchema

xmlns:xalan="http://xml.apache.org/xslt"

xmlns:sql="com.ncr.esb.sql.XConnection"

extension-element-prefixes="sql">

 

 

Below is the code snippet to call this method.

 

<xsl:variable name="db" select="sql:new()"/>

<!-- Connect to the database with minimal error detection -->

<xsl:if test="not(sql:connect($db, 'requestpool'))" >

<xsl:message>Error Connecting to the Database</xsl:message>

<xsl:copy-of select="sql:getError($db)/ext-error"/>

</xsl:if>

 

I have attached the xsl ,jar and the decompiled source file.The first argument to the function is an object,is that causing the error ?

 

Error:

 

XPST0003: XPath syntax error at char 35 on line 53 in {...l:connect($db, 'requestpool...}:
    Cannot find a matching 2-argument function named {com.ncr.esb.sql.XConnection}connect()

 

 Please advise.

 

Many Thanks !!

Habin
------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help