Al --

I'm not sure of your exact environment.  However, you should be able to
instantiate the extension function object from your Servlet and then pass
that object into XalanJ as a parameter.  From there, your stylesheet can
receive the parameter and call methods on it.  In your Servlet, you could
store your context information in instance fields of the extension function
object or in the page context and store a reference to the page context in
an instance field.

HTH,
Gary

> -----Original Message-----
> From: Al Byers [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, February 06, 2003 9:37 AM
> To: [EMAIL PROTECTED]
> Subject: Access to environment from extention function
> 
> 
> Is there a way to allow my Java extension functions to access 
> environmental data - in this case I am running it in a servlet 
> environment and want access to the page context? I realize 
> that I could 
> do it with an extension element, but want to stick to simple 
> functions 
> if i can.
> 
> I could set a class variable. Will that work? Is it safe? I 
> don't quite 
> understand classloaders well enough to know if it will work or 
> consistently work.
> 
> Any help would be appreciated.
> 
> -Al
> 
> -- 
> Al Byers
> Automation Groups Inc.
> 777 South State Street
> Orem, UT 84058
> [EMAIL PROTECTED]
> http://www.automationgroups.com
> 
> 

Reply via email to