
Hi Eliot, Well, we do not set an XMLEntityResolver in oXygen yet, we will probably do that to have the XML Catalog working at that level. You can set an XMLEntiryResolver as a property, here it is an example on the Xerces website: http://xml.apache.org/xerces2-j/faq-xcatalogs.html *** // Set the resolver on the parser. reader.setProperty( "http://apache.org/xml/properties/internal/entity-resolver", resolver); *** Xerces also has implemented an XML Catalog resolver at the XNI level, the above is the FAQ page for the XML Catalog support in Xerces. I have not looked however inside that class to see how they handle schema resources. Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Eliot Kimber wrote:
Eliot Kimber wrote:
Yes, I've been digging into the code and I have a first stab at a fix.
What I've done is extended the XMLEntityResolver interface to add a resolveResourceByUri() method which does nothing but try to resolve the system ID value using the resolver's resolveUri() method.
The problem is that resolveEntity() only works for true entities (that is, resources that would be mapped via SYSTEM and PUBLIC catalog entries). It would be inappropriate to use URI entries to try to resolve an external parsed or unparsed entity, in the same way it's inappropriate to use SYSTEM or PUBLIC to resolve a schema location URI.
I'm trying to hack, I mean fix, the Xerces code for schema resolution to use URI catalog entries, but in trying to test my fix using a DOM parser I can't figure out how to set up the configuration so the schema loader uses my fixed XMLCatalogEntityResolver instead of the default XMLEntityManager.
I'm wondering of someone at Oxygen could show me how Oxygen sets this up since clearly Oxygen is able to set up this configuration.
Thanks,
Eliot