You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Angus McIntyre <an...@pobox.com> on 2001/10/22 12:55:14 UTC
Extension elements/functions: how to get context?
I'm currently writing a Java application that uses Xalan to transform
XML+XSLT to HTML. I'd like the application to do on-the-fly link
checking and re-referencing for any links in the final HTML document.
It currently looks like the best way for me to do that is using an
extension, which will be invoked where appropriate by a stylesheet
template. To handle the links appropriately, I need to know the path
to the source and destination documents (ideally I'd also like to
have access to the Java application class that is running the whole
show, as that has the necessary smarts to do the operation).
So the question is: what's the best way to get that information from
within an extension function? Extension elements seem to get some
kind of processor context which, if I subclassed the transformer
appropriately, might presumably get me back to the parent
application. But it's not clear to me from the doc how to get the
same kind of contextual information from within an extension function.
Suggestions or pointers to relevant source code would be much
appreciated. Thanks in advance
Angus
--
angus@pobox.com http://pobox.com/~angus