You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Jayson Joseph Chacko <Ja...@noida.tcs.co.in> on 2002/02/27 06:30:08 UTC
Validating against an external DTD
Is it possible to validate an XML against an external DTD which is NOT
Specified in the XML file using DOCTYPE ???
Re: Validating against an external DTD
Posted by Jeff Turner <je...@socialchange.net.au>.
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: webmaster@xml.apache.org
To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org