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="javascript:void(0);"> </lxslt:component>

<lxslt:component prefix="parseQuery" elements="" functions="getVdkKey">
 <lxslt:script lang="javaclass" src="javascript:void(0);"> </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