getAssociatedStyleSheet is not using the "correct" base path for an XSLT
file referenced by a stylesheet PI in a web application hosted by Tomcat 3.2.3.

I've got an XML file which has a stylesheet PI naming a .xsl file in the same
directory:
<?xml-stylesheet type="text/xsl" href="agenda.xsl"?>
The base path for tomcat is say /usr/local/tomcat and that for the webapp
is /usr/local/tomcat/webapps/agenda. URI's starting with /agenda are mapped
to a web application. The web application maps .xml file requests to a servlet.
The servlet:
- Get's the request URI: /agenda.xml
- Translates that to the "real" file name: /usr/local/tomcat/agenda/agenda.xml
- Calls TransformerFactory.getAssociatedStyleSheet to get the stylesheet source
getAssociatedStyleSheet knows nothing about the web app base path being
different from the servlet engine base path, and translates the URI /agenda.xsl
relative to the engine base path yielding /usr/local/tomcat/agenda.xsl.
The URI should be mapped relative to the web app base path to
/usr/local/tomcat/agenda/agenda.xsl.

So, what is the right way to do this? I can't imagine that there's a base path attribute
as that wouldn't work with multiple web applications. I wish the Trax api had something
like getAssociatedStyleSheetURI that returned the URI rather than the Source. Then, the
servlet could map it to the right directory.

Is there something in the Trax API that I missed for doing this? Any other ideas?

Thanks,

giuliano