I am modifying an application to use XSLTC instead of Xalan. The application uses a custom URIResolver to resolve document() refrences in stylesheets, and when the resolver is called, it gets different values for the "base" parameter depending on if I'm using Xalan or XSLTC:

- With Xalan, the base is the system id that was assigned to the *stylesheet's* Source
- However, with XSLTC, the base is the system id that was assigned to the *xml document's* Source


Which one, of Xalan or XSLTC, is calling my URIResolver the right way?

For exemple:
StreamSource srcXSL = new StreamSource(inXSL); srcXSL.setSystemId("stylesheet.xsl");
Templates template = transformerFactory.newTemplates(srcXSL);


Transformer transformer = template.newTransformer(); transformer.setURIResolver(new TestURIResolver());

   StreamSource srcXML = new StreamSource(inXML);
   srcXML.setSystemId("document.xml");
   transformer.transform(srcXML, out);

When I use XSLTC, TestURIResolver.resolve() is called with "document.xml" as a base, and when I switch back to Xalan, it is called with "stylesheet.xsl" as a base.

I'm using Xalan 2.4.1

Thanks



Reply via email to