xsl-list
[Top] [All Lists]

RE: Using a custom URIResolver

2004-04-06 01:30:03
Michael Kay wrote:
I'm not sure there is a portable way to do this. Given a specific JAXP 
implementation (such as Saxon or Xalan) you can do it by making your
URIResolver be a subclass of the standard URIResolver, and invoking the
super.resolve() method. You could make it a bit more portable by having = your 
URIResolver accept a reference to the standard URIResolver
using a setStandardURIResolver() method when it is first instantiated.

Thanks for your reaction. I'm indeed using trax (with xalan, I've should have 
told this in my previous email). The thing is that 
javax.xml.transform.URIResolver is an Interface and that I have not been able 
yet to find out which class implements this interface to perform as the 
standard URI resolver. So I don't know which class to subclass. Could you 
please explain what you mean with 'accept a reference to the standard 
URIResolver using a setStandardURIResolver()' method.
Do you mean that I add a public method 'setStandardURIResolver' to my own class 
that implements the interface (or to let the standard URI resolver be passed as 
a parameter in the constructor) and that the value being passed to this method 
can be retrieved from the transformer by using the 'getURIResolver()' method, 
or does this method only return a URI resolver in case you set your own 
resolver before?

Thanks in advance for your reaction!

Björn


<Prev in Thread] Current Thread [Next in Thread>