xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <j...@socialchange.net.au>
Subject Re: Validating against an external DTD
Date Wed, 27 Feb 2002 08:44:07 GMT
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 :)


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:



In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message