schema-for-schema is not really a proper XML Schema. It re-defines
built-in types, and it contains a lot of things that are just not
allowed.
Even if you compile schema-for-schema, I can guarantee you that the way
it is written makes it hopeless to use the generated code for your
purpose. It just doesn't capture the schema concepts behind the surface
syntax.
You should look for other existing libraries that do that.
regards,
--
Kohsuke KAWAGUCHI 408-276-7063 (x17063)
Sun Microsystems kohsuke.kawaguchi_at_sun.com