Subject: SAXON : function extensibility problem From: Frédéric Bages <frederic.bages@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Thu, 3 Aug 2000 15:01:55 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Michael Kay's Book, Carlson, Thor | Thread | RE: SAXON : function extensibility , Kay Michael |
Re: Michael Kay's Book, David A. Cobb | Date | Re: Michael Kay's Book, Larry_Mason |
Month |