Hi,
You are not using the namespace format correctly. Please remove the last
dot from xmlns:XSLTFunctionsPackage="xalan://pack1.team.xsltfunctions.".
Also if "pack1.team.xsltfunctions" is a package name, then "
XSLTFunctionsPackage:new()" is not valid syntax. You cannot invoke a
constructor on a package. The other issue is for an instance method, you
should not prepend the class name to the extension function. In this case
the class name is determined from the first argument to the extension
function.
The correct usage should look like this:
xmlns:XSLTFunctionsPackage="xalan://pack1.team.xsltfunctions"
<xsl:variable name "myType" select="XSLTFunctionsPackage:parseQuery.new()">
<xsl:variable name="vdkKey" select="XSLTFunctionsPackage:getVdkKey
($myType)"/>
<xsl:variable name="tmpFileName"
select="XSLTFunctionsPackage:getSessionId($myType, $vdkkey)"/>
Morris Kwan
XSLT Development
IBM Toronto Lab
Tel: (905)413-3729
Email: [EMAIL PROTECTED]
Mariella Di
Giacomo To: [EMAIL PROTECTED]
<[EMAIL PROTECTED] cc:
v> Subject: XSLTC, abbreviated syntax for
extension implemented in Java and Compiler
error(s): Cannot find external method
...
11/14/2002 07:32
PM
Please respond to
xalan-dev
Hello,
I was trying to compile using org.apache.xalan.xsltc.cmdline.Compile
(version
1.2) an XSL file on Solaris 2.8 and xalan 2.4.0
I am using the abbreviated syntax for extension functions implemented in
Java.
I have tried the possible cases that are described in the documentation and
I
always get the same error:
Compiler error(s):
Cannot find external method 'parseQuery.getVdkKey' (must be public).
Cannot find external method 'parseQuery.getSessionId' (must be public).
1) package format
The java classes I am using belong to a package
called "pack1.team.xsltfunctions"
All the Java methods are public.
The first returns a String
The second takes a String and returns a String
The file1.xsl looks like:
__________________
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:XSLTFunctionsPackage="xalan://pack1.team.xsltfunctions."
<xsl:variable name "myType" select="XSLTFunctionsPackage:new()">
<xsl:variable name="vdkKey" select
="XSLTFunctionsPackage:parseQuery.getVdkKey
($myType)"/>
<xsl:variable name="tmpFileName"
select="XSLTFunctionsPackage:parseQuery.getSessionId($myType, (string)
$vdkkey)"/>
</xsl:stylesheet>
________
2) package format and I made the Java classes
as public static methods
The file1.xsl looks like
____________
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:XSLTFunctionsPackage="xalan://pack1.team.xsltfunctions."
<xsl:variable name="vdkKey" select
="XSLTFunctionsPackage:parseQuery.getVdkKey
()"/>
<xsl:variable name="tmpFileName"
select="XSLTFunctionsPackage:parseQuery.getSessionId((string)$vdkkey)"/>
</xsl:stylesheet>
_______
I get the same errors
3)
I have tried the "Class format" Name Space and I get the same errors.
Could you please tell me what is wrong ?
Could you please help ?
Thanks,
Mariella