Hi,

I have a problem that is very similar to the one specified in the link below.

http://marc.theaimsgroup.com/?l=castor-user&m=113881682316908&w=2

I am not able to generate classes using my binding file for enumerated
types that have the same name.

Here is an excerpt from the XSD that I am having problem with.

<xsd:complexType name="ParentA">
        <xsd:sequence>
                <xsd:element name="AName" type="xsd:string"/>
                <xsd:element name="type">
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="A1"/>
                                <xsd:enumeration value="A2"/>
                                <xsd:enumeration value="A3"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                </xsd:element>
        </xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ParentB">
        <xsd:sequence>
                <xsd:element name="BName" type="xsd:string"/>
                <xsd:element name="type">
                        <xsd:simpleType>
                                <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="B1"/>
                                <xsd:enumeration value="B2"/>
                                <xsd:enumeration value="B3"/>
                                </xsd:restriction>
                        </xsd:simpleType>
                </xsd:element>
        </xsd:sequence>
</xsd:complexType>

Here is the binding file that I have used to resolve the collision.

<binding xmlns="http://www.castor.org/SourceGenerator/Binding";
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
            >

   <complexTypeBinding name="complexType:ParentA/type">
      <java-class name="Whatever"/>
   </complexTypeBinding>

</binding>

This did not generate "Whatever.java". I am wondering if there is a
solution to this. I would appreciate any help.

Thanks
Subu.

-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to