You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Elliotte Rusty Harold <el...@metalab.unc.edu> on 2002/03/01 15:44:23 UTC

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.



Yes, you need to use an EntityResolver that returns your custom 
InputSource from resolveEntity().
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          The XML Bible, 2nd Edition (Hungry Minds, 2001)           |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/   |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org