File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Check if DTD file is valid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Check if DTD file is valid" Watch "Check if DTD file is valid" New topic

Check if DTD file is valid

Gobind Singh
Ranch Hand

Joined: Aug 04, 2006
Posts: 62
As part of my build process, I need to produce a set of DTD's.
Is there an ANT task which tells me if a DTD file is valid i.e well-formed?
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I only see two validators - one built into Eclipse and the other is a web app. And doing a google search for "validate dtd" gives way too many hits on "validate an xml using dtd". Sorry. Maybe someone else will know.

Just a thought: what happens if you use the <xmlvalidate> task and give it an xml file and a DTD that is not valid? Perhaps that task might give a error if the DTD is not well formed...

JBoss In Action
I agree. Here's the link:
subject: Check if DTD file is valid
It's not a secret anymore!