[xsl] Problem with saxon7, Transformer and URIResolver

Subject: [xsl] Problem with saxon7, Transformer and URIResolver
From: Olaf Meske <omeske@xxxxxxxxxxx>
Date: Fri, 08 Apr 2005 14:02:09 +0200

I try to use a customized / wrapped URIResolver with saxon7, to change an additional style sheet imported with
<xsl:include href="myspecial.xsl" />
to resolve this "myspecial.xsl" to some other url.

I created the Transformer with:
TransformerFactory tFactory = TransformerFactory.newInstance();
transformer = tFactory.newTransformer(new StreamSource("./main.xsl"));
// this main.xsl contains the xsl:include
URIResolver resolver = transformer.getURIResolver();
URIResolver newRes = new MyURIResolver(resolver, ...);
// now invoking some xml file with transformer ...

I wonder why my wrapped URIResolver (MyURIResolver) will never be invoked to resolve the xsl:include.

Do I have to set the URIResolver *before* setting the main.xsl for the Transformer? And when I have to, how can I do it?



Olaf Meske

Current Thread