Hi, I may have run across a bug but then again I may just not understand
how castor deals with multiple elements with the same name:

Here's my test case:
run the following xml schema file through castor source generator 0.9.5.3 
and 0.9.5.2 The generated file Organization.java extends orgType1 in one 
case and orgType2 in the other case.

Now I would love do just remove all duplicate element names from my schema 
but unfortunately it is a vendor supplied one and they seem hellbent on 
making my life miserable by using duplicate named elements all over the 
place.

Thanks for any help or info.

Alex.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.mytest.com/2003/aaa"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://www.mytest.com/2003/aaa"; elementFormDefault="qualified" 
attributeFormDefault="unqualified">
    <xs:complexType name="type1">
        <xs:sequence>
            <xs:element name="organization" type="orgType1"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="orgType1">
        <xs:sequence>
            <xs:element name="e1" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="type2">
        <xs:sequence>
            <xs:element name="organization" type="orgType2" 
minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    <xs:complexType name="orgType2">
        <xs:sequence>
            <xs:element name="e2" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
</xs:schema>



----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to