This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

SAXON : function extensibility problem



	I don't know if it is the good place to post this message but it could
interest someone. I had a problem with saxon (maybe it is the same for other
java xsl processors). I currently use Visual age and tomcat has my
development environment and Apache + Jserv has my production environment. I
had a stlysheet that was working under Tomcat but not under Jserv ! Saxon
was raising the following error : "bad argument type". The line in question
is :

	select="date:getTimeToDisplay($start-time,$accuracy)"

The problem is that the java class DateManager was containing 3 static
methods with the same name:

getTimeToDisplay( Date, int )
getTimeToDisplay( String, int )
getTimeToDisplay( String, String)

I don't know why but VA was calling the good one (string, string) but Jserv
was calling one of the two others. I just renamed the others (to
getTimeToDisplay2) and it corrected my problem.

Now from the saxon documentation I can read : "If there are several methods
in the class that match the localname, the first one with the correct number
of arguments is used. There is no attempt to match the type of the
arguments."

What do you think about this has the *first* method can change from one
environment to another ? Couldn't this be changed to a constant order (sum
of characters including arguments types, ...)

Does anyone experienced the same problem with others java xsl processors ?

Fred.


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]