ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: xmlvalidate without doctype against dtd
Date Thu, 24 Feb 2011 14:42:58 GMT
On 2011-02-24, Lukacs, Gabriel wrote:

>     is it possible to validate (via ANT xmlValidate) an xml file
> (without <!DOCTYPE ..../>) against DTD schema stored locally on
> filesystem?

No the xmlvalidate task can't do this since the parser won't use the DTD
if there is no DOCTYPE specified.  XMLUnit can do that[1] and you could
wrap it into a JUnit testcase and use the JUnit task.

Stefan

[1] http://xmlunit.sourceforge.net/userguide/html/ar01s04.html#DTD%20Validation

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message