I just added the following comments to bug 14561:

XSLTC does not support the BSF syntax (component and script) for invoking
extension functions. Please use the abbreviated syntax instead. See this
page
for details (http://xml.apache.org/xalan-j/extensions_xsltc.html).


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 
org.apache.xalan.xsltc.cmdline.Compile and Type check  error in     
                                                
funcall(pack.team.xsltfunctions.vdkPrevNextUrls.prevNextUrls,  [funcall(string,    
                      11/14/2002 02:44          [variable-ref(vdkKey/node-set)])]).    
                                            
                      PM                                                               
                                            
                      Please respond to                                                
                                            
                      xalan-dev                                                        
                                            
                                                                                       
                                            
                                                                                       
                                            



Hello,

I am trying to compile an file1.xsl using
org.apache.xalan.xsltc.cmdline.Compile -x file1.xsl

The stylesheet includes seom java extension functions used in file1.xsl

The file1.xsl looks like:

____________
<?xml version="1.0"?>
<xsl:stylesheet
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";

 xmlns:lxslt="http://xml.apache.org/xslt";
 xmlns:prevNext="vdkPrevNextUrls"
 xmlns:parseQuery="parseQuery"

 version="1.0">

<lxslt:component prefix="prevNext" elements="" functions="prevNextUrls">
 <lxslt:script lang="javaclass" src
="pack.team.xsltfunctions.vdkPrevNextUrls"/>
</lxslt:component>

<lxslt:component prefix="parseQuery" elements="" functions="getVdkKey">
 <lxslt:script lang="javaclass" src="pack.team.xsltfunctions.parseQuery"/>
</lxslt:component>

<!-- call external functions -->
 <xsl:variable name="vdkKey" select
="pack.team.xsltfunctions.parseQuery.getVdkKey"/>
 <xsl:variable name="tmpFileName" select
="pack.team.xsltfunctions.parseQuery.getSessionId"/>

 <xsl:variable name="prevNextResponse">
 <xsl:if test="string-length($tmpFileName) &gt; 0">
 <xsl:value-of select
="pack.team.xsltfunctions.vdkPrevNextUrls.prevNextUrls(string($vdkKey))"/>
 </xsl:if>
 </xsl:variable>

</xsl:stylesheet>

____________

The function java prevNextUrls takes a String as input parameter and
returns
a String.

1)
When I try to compile the file I get the following error:

Compiler error(s):
 Type check error in
funcall(pack.team.xsltfunctions.vdkPrevNextUrls.prevNextUrls,
[funcall(string, [variable-ref(vdkKey/node-set)])]).

2) The two java functions
getVdkKey and getSessionId do not take parameters but each returns a
String.
If in the stylesheet If I call
<xsl:variable name="vdkKey" select
="pack.team.xsltfunctions.parseQuery.getVdkKey"/> I do not get any error.
If I specify the paretheses for the function
<xsl:variable name="vdkKey" select
="pack.team.xsltfunctions.parseQuery.getVdkKey()"/>

I get the following error:

Compiler error(s):
 Type check error in funcall(lanl.lww.xsltfunctions.parseQuery.getVdkKey,
[]).


Could you help please ?

Thanks,

Mariella



Reply via email to