I wrote a class extending XmlUrlResolver to allow references to public identifiers in XML documents. For example, when an XML document begins with:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE chapter PUBLIC "-//Custom//EN" "custom.dtd">
The public identifier "- // Custom / EN" is passed to the parameter of relativeURImy overriden method ResolveUri()and resolved to the actual DTD location on disk. This is working correctly.
The problem arises when there is an entity reference in the DTD itself. For instance:
<!ENTITY % tablemodel
PUBLIC "-//OASIS//DTD XML Exchange Table Model 19990315//EN"
"soextblx.dtd">
In this case, the system identifier "soextblx.dtd" is passed in ResolveUri()instead of the public identifier "- // OASIS // DTD XML Exchange Table Model 19990315 // EN".
? GetEntity() , .