Re: DTD scanned despite being preloaded into grammar pool

2005-02-24 Thread Michael Glavassevich
Hi Raj, Thanks for catching this problem. I've applied a fix to CVS, one somewhat different than what you suggested. EntityResolver2 isn't supported in Xerces 2.6.2 (the most recent release) nor will you find it in the latest CVS code. We plan to move up to SAX 2.0.2 which includes EntityResolv

Re: DTD scanned despite being preloaded into grammar pool

2005-02-24 Thread Ritu Raj Tiwari
Michael, I took the following lines in XMLDocumentScannerImpl$ContentDispatcher.resolveExternalSubsetAndRead(): try { fDTDScanner.setInputSource(src); while (fDTDScanner.scanDTDExternalSubset(true)); } finally

Re: DTD scanned despite being preloaded into grammar pool

2005-02-24 Thread Ritu Raj Tiwari
Hi Michael, I am using the xerces implementation bundled with JDK5.0. Like I mentioned earlier, when a document w/o a doctype is encountered, the following method is called on my entity resolver: public InputSource getExternalSubset( String name, String baseURI ) I stepped through my debugger aft

Re: DTD scanned despite being preloaded into grammar pool

2005-02-23 Thread Ritu Raj Tiwari
>Am I missing something here? If the document has no > DOCTYPE declaration there's no DTD to load. Before using the XMLReader, I set my own EntitResolver2 implementation as the XMLReader's entityResolver. On running in a debugger, For documents that *do* bear a DOCTYPE declaration, I see the follo

Re: DTD scanned despite being preloaded into grammar pool

2005-02-23 Thread Bob Foster
Michael Glavassevich wrote: Am I missing something here? If the document has no DOCTYPE declaration there's no DTD to load. Maybe my assumption was wrong. I assumed he specified it in his code. But you're right, it isn't in the code he showed. Bob

Re: DTD scanned despite being preloaded into grammar pool

2005-02-23 Thread Michael Glavassevich
Am I missing something here? If the document has no DOCTYPE declaration there's no DTD to load. Bob Foster <[EMAIL PROTECTED]> wrote on 02/22/2005 11:00:40 PM: > Sounds like a bug to me. If the cache is installed, Xerces should use it > for every DTD/schema access. > > Bob Foster > > Ritu Ra

Re: DTD scanned despite being preloaded into grammar pool

2005-02-23 Thread Bob Foster
Sounds like a bug to me. If the cache is installed, Xerces should use it for every DTD/schema access. Bob Foster Ritu Raj Tiwari wrote: Now, DTD caching seems to work fine for documents that have a DOCTYPE declaration. But for documents where no such declaration is present, stepping through the c

DTD scanned despite being preloaded into grammar pool

2005-02-23 Thread Ritu Raj Tiwari
My application encounters XML documents that all conform to the same DTD. I create an XMLReader using the SAX APIs: SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(bValidating); SAXParser parser = factory.newSAXParser(); XMLReader xmlreader = parser.getXMLR