amouat / xsd-validator

Validates XML files against XML schema
Apache License 2.0
80 stars 25 forks source link

Error reading XML Schema due to minOccurs="0" attribute #10

Open JanOppolzer opened 10 years ago

JanOppolzer commented 10 years ago

Hi Adrian,

as you asked in #9, I'm sending XML Schema (ext-scope-new.xsd) file which produces "Error reading XML Schema" message.

I've tried to validate XML files against ext-scope.xsd as well as ext-scope-new.xsd using xmllint without any problem; however, xsd-validator works fine only for ext-scope.xsd while producing the mentioned error message for ext-scope-new.xsd.

There's just one difference between these XSD files and it's minOccurs attribute.

Try to validate idp-hostel-eduid-cz.xml, www3-eduid-cz.xml and www3-eduroam-cz.xml.

Since attaching XML/XSD files is not possible with GitHub, you can grab the files at http://devnull.cesnet.cz/xsd-validator/

amouat commented 10 years ago

Thanks Jan, I'll take a look when I can.

Which version of the JDK are you using? It might be worth updating. xmllint doesn't fully implement xml schema, so I'm a bit surprised it seems to be doing better...

JanOppolzer commented 10 years ago

I'm using the latest openjdk-7-jre from Debian Wheezy:

$ java -version
java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1~deb7u1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)