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: pass HttpServletRequest from xslt to java function


Ming wrote:
> In my stylesheet, I need to call a java function,
> xmljsp:getXsltName(HttpServletRequest req). So, the method getXsltName needs the
> variable HttpServletRequest. Do you know any way that I can pass the request from
> my stylesheet to my java function?

There is no standard way to pass data which is not of
an XPath data type through an XSLT processor to extension
functions.
The easiest way to get around this is to obtain the XSLT
name outside the processor invocation and pass it as
parameter to the style sheet.
An alternative approach is to store the request object
in some global variable (static class variable) and
write a wrapper around your function which is called
from your style sheet and gets the request object from
the global.


J.Pietschmann



 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]