This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Call Java Objects
- From: "Venkateshwar Bommineni" <vbommineni at elogex dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 9 Apr 2002 09:34:07 -0400
- Subject: RE: [xsl] Call Java Objects
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@hotmail.com]
Sent: Tuesday, April 09, 2002 9:13 AM
To: xsl-list@lists.mulberrytech.com
Subject: [xsl] 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