users@jaxb.java.net

Why would schemagen generate a "schema2.xsd" that imports the schema that I asked to be generated?

From: KARR, DAVID (ATTSI) <"KARR,>
Date: Wed, 2 Mar 2011 10:53:55 -0800

I'm helping a colleague with a schemagen problem. He has a package full
of classes with @Xml annotations and a package-info, and he has a
"schemagen" Ant task to generate a schema from those classes. The task
generates the schema name that was asked for, but it also generates a
"schema2.xsd" in the current directory, where both that schema and the
schema with the desired name import each other. Although it put the
schemas in the same directory, the generated "schemaLocation" attributes
say that they're supposed to be several directories away from each
other. There's no reference to "schema2" anywhere in the classes or the
Ant task specification.

In general, what are some reasons why schemagen would generate a second
unspecified schema and connect the main schema to that other schema?