views:

411

answers:

1

As part of my build process I want to validate XML files against a Schema (XSD). I'm trying to use the schemavalidate task like this:

<schemavalidate noNamespaceFile="schemas/Model.xsd" file="Model.xml"/>

This yields the following error:

[...]
BUILD FAILED
build.xml:65: The following error occurred while executing this line:
build.xml:59: Parser does not support Xerces or JAXP schema features

I'm using the latest ant distribution (1.7.1). Are any additional libraries needed to get validation to work?

+1  A: 

The schemavalidate task is actually working as shown in the question.

The problem was that the xsd file was not present. Unfortunately, the error message is rather confusing. Ant only complains about the missing file when it is started in verbose mode.

I'm closing this question.

Christian Berg