eee
eee

Reputation: 45

Validate XML against XSD 1.1 schema / XSD (using Saxon-B / saxon 9.1.0.8) on command line (Linux)

I have been trying for several days now to get a linux command line validation of XML against an 1.1 Schema/XSD to work. (I don't really care about the tool, as long is it is a free linux tool supporting xsd 1.1 statements like "assert")

So far I have found / tried:

./java -cp "<path to saxon libs>/lib/saxon-9.1.0.8.jar" com.saxonica.Validate /home/<myuser>/test.xml Fehler: Hauptklasse com.saxonica.Validate konnte nicht gefunden oder geladen werden

("Main Class could not be found") (Oviously I need to provide more options to validate against a schema, but since the class can not be found, ...)

Running Java 1.7 build 71

bin$ ./java -version java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Has anyone got a working example of a tool (preferably saxon-B) where I can validate XML against XSD 1.1 on linux command Line?

Thank you,

e

Upvotes: 1

Views: 2258

Answers (1)

Michael Kay
Michael Kay

Reputation: 163342

To use the Saxon schema validator, you need Saxon Enterprise Edition; the minimum license needed is EEV, which costs £90. You can get a free 30-day evaluation license from www.saxonica.com. Schema processing is not available in the open source versions of Saxon (Saxon-B, Saxon-HE), and never has been.

There is a version of Apache Xerces that supports XSD 1.1 but I can't give you any help with it, I'm afraid. There is also a commercial XSD 1.1 implementation from Altova.

Upvotes: 1

Related Questions