Ken said:
As far as I know the Schema Object Model (SOM) is only working for
the MSXML Parser together with CSharp or VisualBasic but not Java.
I think MS has implemented a schema object model in both MSXML (which is
COM based so it can be used with anything on Windows from C++, VB,
J(ava)Script, VBScript, active state Perl) and in .NET (where you can
use it with any .NET language, one of which is J#, the .NET dialect of
Java).
Is there a similar Tool/Spec/Api for the Java World?
The W3C in DOM Level 3 initially did some work on integrating such stuff
into the DOM however as for schemas only a W3C note
http://www.w3.org/TR/2002/NOTE-DOM-Level-3-AS-20020725/
resulted from that work but no W3C recommendation (standard).
There is also a recommendation of a validation module
http://www.w3.org/TR/2004/REC-DOM-Level-3-Val-20040127/
which might be interesting for you.
Besides that you have to look at the different parsers around, Xerces
Java implements an XML schema API as documented at
http://xml.apache.org/xerces2-j/faq-grammars.html#faq-5
though I am not familiar enough with it and the MS SOM to tell you
whether they offer the same features.
I think checking the Oracle XML parser for such APIs is also worth a try.