RNGOM is an open-source Java library for parsing RELAX NG grammars. In particular, RNGOM can:

  1. parse the XML syntax
  2. parse the compact syntax
  3. check all the semantic restrictions as specified in the specification
  4. parse RELAX NG into application-defined data structures
  5. build a default data structure based around the binarized simple syntax or another data structure that preserves more of the parsed information.
  6. parse foreign elements/attributes in a schema
  7. parse comments in a schema

See this page for more details and downloadables. If you got any comments or questions, please subscribe to users@rngom.dev.java.net and post a question there.