XSD4J is a library to parse XML Schema files into a structure of Java objects, convert those back into an XML DOM tree (and hence plain text) again, and allow for performing several queries on the XSD objects. The library currently supports most real-world features such as simple and complex types, type restrictions and attributes. The aim is to gain high conformance to the XML Schema SE specification without being dependent on other software. In particular, WSGUI inference mechanisms must be implementable easily.
XML Schema constructs are represented by the classes XSDElement, XSDAttribute, XSDSequence, XSDType, XSDRestriction, XSDAnnotation and XSDSchema. Building and handlings objects of the type XSDSchema, which contains all others, happens via XSDParser, XSDDumper and XSDValidator. Some helper classes are included as well. Also, XSD4J contains an internal copy of RegExpInstantiator for convenience.
Two tools are included in the source package (although not in the jar file): Regex2XSD converts a regular expression into a schema, and XSDGraph creates a visual graph of the entire type system of XML Schema, SOAP encoding and a custom system from a XSD file, all being connected so that the derivations can be seen easily.
XSD4J is currently being provided in source format and as a ready-to-use JAR package. It is licenced under the GNU GPL. The latest version can be found on the download page.
Make sure to consult the API docs before trying to use the library in an application. More documentation is available in the form of two graphics, one showing the class relationship of the XSD4J document tree, and the other one showing how to use XSD4J especially when dealing with instance data. From XSDGraph, this nice type graph has been produced. Or how about a scalable UDDI type graph? (Latest version as medium PNG, large PNG.)
Dynvocation is a FutureSOA project developed at the Chair of Computer Networks at the Faculty of Computer Science of the Dresden University of Technology.