Hi All I am using Castor Source Generator with the attached XSD, and am getting lot of "Class name Conflicts", and for almost all elements, am bound to get similar errors. Because, they have defined the XSD that way, where a complex type is of the same type. <xs:element name="Instances" type="Instances" minOccurs="0"/> Warning: A class name generation conflict has occured between complexType 'Instances' and element 'Instances'. Please use a Binding file to solve this problem.Continue anyway [not recommended] (y|n|?)
To an extent, i overcame these errors by changing the type to InstancesType so that it doesnt confuse between element and type. I did this for all the elements and types that had conflicts. <xs:element name="Instances" type="InstancesType" minOccurs="0"/> However, the one complex type that gives issues is as below. The element Instance of Instance type, can contain 0 or more Instance of the same type, Now going by my idea of changing only the types to avoid conflicts, if i change to <xs:element name="Instance" type="InstanceType" minOccurs="0" maxOccurs="unbounded"/> SrcGen complains of Class conflict again. <xs:complexType name="Instance"> <xs:sequence> <xs:element name="Description" type="xs:string" minOccurs="0"/> <xs:element name="Vista" type="VistaDefinitionType" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="Location" type="Location" minOccurs="0" maxOccurs="1"/> <xs:element name="PropertyValue" type="PropertyValue" minOccurs="0" maxOccurs="unbounded"/> <xs:choice minOccurs="0"> <xs:element name="Basic" type="BasicReferenceType" minOccurs="0"/> <xs:sequence> <xs:element name="Instance" type="Instance" minOccurs="0" maxOccurs="unbounded"/> ---Changing this line above </xs:sequence> </xs:choice> </xs:sequence> <xs:attribute name="Name" type="xs:string" use="optional"/> <xs:attribute name="Tag" type="xs:string" use="required"/> <xs:attribute name="VistaName" type="xs:string" use="optional"/> <xs:attribute name="VistaWid" type="xs:string" use="optional"/> </xs:complexType>
NewAD.xsd
Description: NewAD.xsd
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email