I don't get it. setSystemId() actually change your input file name. Not DTD file name.
How exactly you did it? Andrew Duan Escalate, Inc. -----Original Message----- From: Thornton, Marc [mailto:[EMAIL PROTECTED] Sent: Monday, April 01, 2002 11:40 AM To: '[EMAIL PROTECTED]' Subject: RE: SAX - Forcing DTD validation? I did find a way and I hope it's the right one? Used the setSystemId() method on the InputSource to set the DTD to my local one... I guess I was surprised to see that the InputSource was more than a generic wrapper around a InputStream/Reader. Sorry, should've mentioned: SAX(2?) parser, Xerces-J 1.4.4... Any caveats anyone is aware of in using this solution? I know that when I already had a DTD declaration in my XML, I received an error based on the format of the header (either DOCTYPE or ?xml version info) when I used this approach. Thanks in advance, Marc -----Original Message----- From: Thornton, Marc Sent: Monday, April 01, 2002 1:44 PM To: '[EMAIL PROTECTED]' Subject: SAX - Forcing DTD validation? Is there any way to force validation of a specific DTD on a file that does not already define one? I want to do this to allow a user the flexibility of opening the XML file in, for example, Internet Explorer, without that user requiring the DTD file to view it... Of course, I know I could wrap the InputSource and mangle the XML string in memory to introduce the DTD... but I'm looking for a more elegant solution, if it's available. Thanks. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
