Hi,

I am having the following problem. In my (given) xml schema some elements
have the same name in different contexts.
For example:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; version="2.2.1">
    <xs:complexType name="A2DType">
        <xs:sequence>
            <xs:element name="Shape">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="circle"/>
                        <xs:enumeration value="triangle"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="A3DType">
        <xs:sequence>
            <xs:element name="Shape">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="sphere"/>
                        <xs:enumeration value="cube"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:schema>

I would like to use the code generator to encapsulate the above two shape
enumerations into two different classes A2Shape and A3Shape, but so far i
have had no luck by using binding files.
My issue is related to CASTOR-1924 but, for me, naming the anonymous
simpleType is not a solution. Is there meanwhile another solution for this
problem?

Reply via email to