You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Mariella Di Giacomo <ma...@lanl.gov> on 2002/11/15 01:32:39 UTC
XSLTC, abbreviated syntax for extension implemented in Java
and Compiler error(s): Cannot find external method ...
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