On Tue, 2007-09-18 at 09:30 -0400, Santiago Pericas-Geertsen wrote:
>   You cannot set a resolver on a Templates object, so I'm assuming  
> that you mean the one set on the TransformerFactory. 

Yes, I wrote above:
> Yes, the Templates' resolver (set on the TranformerFactory) resolves
> > xsl:import/xsl:include

> So if you set  
> one on the TransformerFactory for xsl:import/xsl:include isn't it  
> used for a Templates object created from that factory? If the answer  
> is no, then that is a bug. Perhaps you can write a short unit test to  
> show the problem.


This has been a bug for as long as XSLTC has existed. I have reported it
several times.

But it is pretty simple to reproduce:

- create an XSL file the either imports or includes another XSL, and
uses the document function to bring in an XML. The files should not be
relative to the XSL
- create two URIResolvers that can resolve (perhaps in different ways)
the files mentioned above

1. Get a a newInstance of a TransformerFactory
2. Set one resolver on the factory
3. Get a Templates object
4. Get a Transformer object from the Templates object
5. Set the other resolver on the Transformer
6. Run the transformation

I will try to get a test case later, but it is a bug, has been for a
while... For what it is worth Caucho' Resin XSLT compiler does the same
thing (or at least it did).

best,
-Rob

> 
>   Thanks.
> 
> -- Santiago
> 
> [1] http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/ 
> TransformerFactory.html
> 
> >>> Xalan interpretive does do this and allows you to set a different
> >>> resolver for the Transformer. (So does Saxon 6x).
> >>>
> >>> Thanks,
> >>> -Rob


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to