You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Yuri de Wit <yu...@metaserver.com> on 2003/09/03 17:58:15 UTC

Passing context information to xalan extensions

All, 

What is the best approach to pass context information to Xalan extensions?
We are looking for a way for the code executing the transformation (creating
the transformer, sources, result, etc) to pass a reference/context to
extension elements invoked by Xalan.

Our first thought was to set a parameter on the transformer and get it in
the extension using the XSLTProcessorContext api. But from what the doc
says, it is only available for extension functions not for extension
elements.

Our second thought was to use a thread local to pass the context
information. Is it a safe assumption that the same thread invoking the
transformation will be the one invoking the extension?

Our third thought was to explicilty set an id as a transformer parameter and
explicitly pass it to the extension element by passing the parameter to the
extension element in the stylesheet. (we would like to get away from this)

Thanks in advance,

Yuri