wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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: 5812

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
jQuery in Action, 2nd edition
subject: Check if DTD file is valid
Similar Threads
org.xml.sax.SAXParseException: The content of element type "forward" must match" Please help
RAD is looking up internet for DTD
XSD file
apply- templates!!!!!!!!
Struts validation issue: Cannot load a validator resource