Title: RE: InputSouce(InputStream) and DTDs
try to use an entity resolver:
 
public class TheEntityResolver implements EntityResolver
{
  public InputSource resolveEntity(String publicId, String systemId)
    {
     return new InputSource("file:///C:/oops/schema.dtd");
    }      
}
-----UrsprÃngliche Nachricht-----
Von: Wai-Yip Tung [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 28. Februar 2002 15:19
An: [EMAIL PROTECTED]
Betreff: RE: InputSouce(InputStream) and DTDs

The setSystremId() helps to change the URI context. My problem is I have my custom input source, e.g. a cache HTTP input source
 
   InputSource source = new InputSource(new MyCachedInputStream("document.xml"));
 
I can parse using the custom input source but the DTD always base on from java URL class. Is there a way to pass in input source for DTD or schema? setSystremId()  doesn't help.
 
Wai yip tung
 

Reply via email to