I'm using Castor XML code generator. If you have two schemas with complexTypes defined as follows:
<xs:schema ...blah...>
<xs:complexType name="FooBarType">
<xs:sequence>
<xs:element name="meh"/>
...etc...
</xs:sequence>
</xs:complexType>
<xs:element name="FooBar"/>
</xs:schema>
and
<xs:schema ...blah ...>
<xs:include schemaLocation="FooBar.xsd">
<xs:complexType name="AnotherSchemaType">
<xs:sequence>
<xs:element name="foo" type="FooBarType"/>
...etc...
</xs:sequence>
</xs:complexType>
<xs:element name="AnotherSchema"/>
</xs:schema>
Now, from the second schema Castor generates the field _foo of type Foo that is a subclass of the FooBar class.
Why can't a name just be a name? I understand it's to avoid naming collisions, but I want a field _foo of type FooBar in my generated class. Any ideas?