xsl-list
[Top] [All Lists]

Re: xslt extensions error : 'Call to extension function failed'

2002-10-02 06:41:06
It is difficult to tell you what the problem is , unless u show the code.But it is very likely that you have not given the namespace declaration properly.
for example, if u have a class that is called com.myexample.myclass
and if u wanted to refer to it as myclass, then your <stylesheet> element should look like.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:myclass = "com.myexample.myclass" extension-element-prefixes ="myclass">

and u must refer to the class method with "myclass". eg..
if u have a method called calculate() in your class, then
<xsl:value-of select="myclass:calculate()"/>
would make a call to the calculate() method of the class myclass.
HTH
Vasu

        I am trying to use xslt java extensions and am having problems when
I write

my own custom classes and try to use them. When I use the "xmlns:java"

namespace the code runs fine.

The error I get when using my custom class is : "Call to extension function

failed: com.example.DateFormatter". The problem is the error doesnt give out

much information. Does anyone know what the possible cause'(s) of this error

are. Btw the code happens to run on an appserver. Thanks in advance for all

the help.



Amit

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>