I have some trouble with an (missing) encoding declaration.
I use the DeclHandler interface to get information about an
external DTD.

If the DTD's first line is:

        <?xml version='1.0' ?>

I receive the exception: 

        org.xml.sax.SAXParseException
                "The encoding declaration is required in the text
declaration".
        at
org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1056)
        at
org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDScanner.
java:651)

If I omitt the line "<?xml ..." at all it works. It works
also when specifying an encoding declaration. As I understood
an encoding declaration is optional for ASCII and UTF-8 text
which my DTD is. 

Does anyone has a hint what the problem is?

Thanks,
Michael Herrmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to