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]
Other format: [Raw text]

RE: java methods vs XSL templates


> I have requirement for functionalities like date format 
> conversion ie from YYYYMMDD to DD:MM:YY.. now i can write a 
> java method that does this or i can write a xsl template 
> that will do this.I can then store it in an utility XSL file and keep 
> calling that template through xsl:call-templates , and pass 
> the date as 
> parameter and store the return value in a variable.
> 
> i however think that writing a java method is a  more elegant 
> way of doing 
> this ,as java code is precomplied and would take less processing time.
> 
It's easy to do this using concat() and substring().

The extra processing speed of Java is offset by the cost of doing a
function call from one language environment to another, and by the loss
of portability.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 


 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]