[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|