Walt Fitzharris
-----Original Message-----
From: Fitzharris, Walter M. (LNG-DAY) Sent: Friday, October 10, 2003 11:09 AM To: 'Anthony Rabaa' Subject: RE: 2 SAX filter chain questions Oh, I get it
now! My verbage below it could be interpreted that if I just put the
resolver on the reader -- with the chain still connected to it --
it
would work.
No, that's not what I meant:
If the reader is
the sole item in the chain...no filters, just the reader
(not much of a chain -- one link), then the resolver gets called
during the parse.
If I stick the
reader on the end of my chain, the resolver never gets called...the dtd is found
ONLY via the system part of the DOCTYPE...if it is not found on the local dir of
the filesystem, the parse fails.
Walt Fitzharris
-----Original Message----- Fitzharris, Walter M. (LNG-DAY)
wrote:From: Anthony Rabaa [mailto:[EMAIL PROTECTED] Sent: Thursday, October 09, 2003 8:39 PM To: Fitzharris, Walter M. (LNG-DAY) Subject: Re: 2 SAX filter chain questions Does anyone know: 1. How to use a custom entity resolver with a chain of sax filters? In desperation, I have tried to set my custom resolver for all filters in the chain, but it doesn't get called when the DTD is encountered in the XML doc. If I use just the reader alone, it calls my custom resolver. Hello, Read your post and wanted to help. I don't have a specific answer for you yet, but I do have a couple of questions. My first thought about your question is why would you require an entity resolver in each filter? My first question is why do you need the resolver for each filter? My second question is, I've looked for your "sax filter" but haven't been able to find the class definition. If it extends the org.xml.sax.XMLFilter class, the method setEntityResolver() should do the trick. Hope this helps! --
Anthony Rabaa Software Developer AMCon Research Inc., Ottawa, Ontario, Canada http://www.amconresearch.com |
- 2 SAX filter chain questions Fitzharris, Walter M. (LNG-DAY)
- Fitzharris, Walter M. (LNG-DAY)