On Wed, Feb 27, 2002 at 11:00:08AM +0530, Jayson Joseph Chacko wrote:
> Is it possible to validate an XML  against an external DTD  which is NOT 
> Specified in the XML file using DOCTYPE ???

No, AFAIK. If there's no DOCTYPE declaration, your parser won't
validate. Simple as that.

If there IS a DOCTYPE declaration, you can fiddle it with XML Catalogs
(see Norm Walsh's code in xml-commons). If there is no DOCTYPE
declaration, Catalogs won't work.

So.. (tada..) my solution :)

http://opensource.socialchange.net.au/doctypechanger/

Lets you add, remove, modify (conditionally), and otherwise play with
the DOCTYPE declaration on an incoming XML stream, *before* the parser
gets to it.

As long as you're dealing with 8 bit chars, that should work fine.

Documentation here:

http://opensource.socialchange.net.au/doctypechanger/latest/apidocs/


--Jeff

---------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to