I would like to validate a given Word 2007 XML file against the Schema defined in wml.xsd. How could it be done in Java? Loading the Schema with the following line is not a problem. But it seems that I have to tweak the validation process becaus I get error messages even on valid input files (I could open and view the input file in Word 2007 without warnings)
Schema schema = schemaFactory.newSchema(source); // <-- complains on valid input files
Validator validator = schema.newValidator();