This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design 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
Author

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
author
Bartender

Joined: May 14, 2008
Posts: 5852
    
    7

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Check if DTD file is valid
 
It's not a secret anymore!