[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Call Java Objects
Subject: RE: Call Java Objects
From: "Laura Jenkins" <xsl_list@xxxxxxxxxxx>
Date: Tue, 09 Apr 2002 14:03:34 +0000
|
Hi venkat .. was helpful.( though dint try as yet :D ) can you also tell me
. if i have to pass on parameters to the method how do i do that.
for example
public class MathClass{
public int findSum(int n)
{
return n*(n+1)/2;
}
}
in this case how do i call the method findSum(int n)..where am i supposed to
send the parameter??
.. This is very interesting
thanks very much in advance
laura
From: "Venkateshwar Bommineni" <vbommineni@xxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: Call Java Objects
Date: Tue, 9 Apr 2002 09:34:07 -0400
Yes you can do. Thats XSLT extensions feature. I am not sure about other
processors but you can achieve it through latest Xalan.
public class DateFormat{
public String getTodayDate(){
return new Date().toString();
}
}
All you need to do is, define namespaces as your java classes like:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:DateFormat="JavaDateFormat"
extension-element-prefixes="DateFormat">
And in your templates you could use as,
<xsl:value-of select= "DateFormat:getTodayDate()" />
try out.
--Venkat
-----Original Message-----
From: Laura Jenkins [mailto:xsl_list@xxxxxxxxxxx]
Sent: Tuesday, April 09, 2002 9:13 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Call Java Objects
Dear Gurus of the list( who have never let me down ),
I have a query..
can i call java objects in my XSL.. is it possible that i do some cool
business logic at the Java end and have methods in Java that return some
result.
all i wana do is that do some complex stuff in the java end and return
the
result ( thro some method which i will call in XSL )and capture it in a
variable for me to use.
is it possible to do such a thing. Forgive me if the question is very
weird.
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
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
RSS 2.0 |
|
Atom 0.3 |
|
|