> I thought
> about reading the schema directly "as XML" (say an XSD or RNG
> xml formatted schema), but I think that may be very difficult
> becauase the schema is not fully expanded. There are a lot
> of "rules" that have to be processed for a schema to make sense.
If you want to pursue that option, Saxon allows you to export a schema in an
XML format called SCM (for Schema Component Model) which is close to the
abstract model of schema components defined in the XSD spec - it should be
much easier to work from this than from raw XSD schema documents.
Regards,
Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay