hi - Extreme newbie here, apologies in advance. I have an XSLT stylesheet that needs to know some information from the HTTP request -- specifically, a cookie value. I know there is an option for making cookies available to the XSLT transformer, but I don't think changing the transformer is an option in this case, because this is within Daisy and I need the rest of the Daisy webapp to behave as usual. I see two promising approaches, but I'm unclear on how to apply them:
1. Add an extension to the sitemap. I see how to create a pipeline that will call my JavaScript code, and I can get the cookie value within JS. But then I don't see how to get this value from within the XSLT that's in the Daisy pipeline. I don't want to actually generate web content from within the extension -- that should stay in the XSLT. 2. Define a JS extension function within the stylesheet itself. As long as I have bsf.jar, this works fine... except that now my JS code doesn't seem to have access to the Cocoon API, or at least to the global variable "cocoon"; so I can't refer to the current request and get its cookies. This seems like it shouldn't be a terribly unusual thing to want to do, and I'm hoping I've missed some really obvious solution. I've asked around on the Daisy list too, but I don't think this is anything Daisy-specific (apart from the limitation of not wanting to mess with the currently defined pipeline). thanks, Eli -- View this message in context: http://www.nabble.com/JavaScript-in-stylesheet-vs.-in-sitemap-flow-tp21555056p21555056.html Sent from the Cocoon - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org For additional commands, e-mail: users-h...@cocoon.apache.org