[EMAIL PROTECTED] wrote:
Hello,

            I am able to install my own EntityResolver using
theXalanTransformer.setEntityResolver() and Xerces is invoking the customer
EntityResolver's resolveEntity method. Is it possible to obtain the baseURI
of the document (xml or xsd) in which this entity was referenced?

Unfortunately it is not, at least up to Xerces 2.5. I tried to implement EntityResolver2 in the past, but I couldn't work out how to implement setExternalSubset and no-one seemed interested in explaining it.

In the end, what I did was to use the XMLEntityResolver object instead, and add support for that to Xalan.

Neither route has made it back into the source (one not complete and the other importing a feature that's not used by SAX), but the latter approach is at:

http://www.blushingpenguin.com:8080/viewcvs/trunk/gnomon/source/patches/

Those patches should apply to Xerces 2.5+Xalan 1.7 (which are little old now). Bear in mind that they also include some (for your purposes) redundant code to allow Xalan extension functions to create dynamic nodesets (something else that never made it back into the source!).

Mark

Reply via email to