Goal: do XML/XSD validation with Ant 1.5.4 and JDK 1.4.2. How?

D

david.karr

I really need to be able to validate XML against an XSD, using Ant
1.5.4 and JDK 1.4.2. It appears this is straightforward to do with the
latest Ant release and/or the latest JDK, but not with the releases
that I'm limited to.

I noticed the "iso-relax" sourceforge project, which includes the JARV
library (which contains the Ant task). This was promising, but it
causes an NPE to be thrown in Xerces' XMLSchemaValidator class, and I
have no idea why.

I'm querying the ant-user mlist about this, but I figured this would be
another good place to try.
 
E

E.Otter

Buried somewhere in the documentation for the 1.4 JDK is a statement that
the included XML parser class cannot do schema validation (DTD validation:
yes, Schema validation: no). However, I believe that Ant uses the XML
parser in its ANT_HOME/lib directory. You probably have an older xerxes.jar
and the your best bet is to delete that and download the latest xerces.jar
and drop it into the ANT_HOME/lib directory.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top