[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Resolving DTD location using a SAX2 EntityResolver
- To: "Xml-Dev (E-mail)" <xml-dev@lists.xml.org>
- Subject: Resolving DTD location using a SAX2 EntityResolver
- From: Taras Tielkes <taras@info.nl>
- Date: Mon, 26 Nov 2001 14:48:55 +0100
Hi,
I'm using Xerces 1.4.1 via SAX2.
I want to validate some documents against an external DTD. The documents
themselves have a DOCTYPE like this:
---------------
<!DOCTYPE bericht SYSTEM "bericht.dtd">
---------------
I set the following parser features to true:
http://xml.org/sax/features/validation
http://apache.org/xml/features/validation/warn-on-undeclared-elemdef
Now, I want to validate the documents on different hosts. Every host will
likely store the DTDs in a different directory.
This will cause the parser to fail, reporting that it can't find the DTD.
I want to implement the DTD resolving myself. Can this be done using the
EntityResolver interface?
If I implement a custom EntityResolver, and register it, I don't see any
calls coming in.
Any suggestions?
// tt