I'd rename the complex type _Authentication to AuthenticationType ( which is clearer ) and repeat for others. I'd run the source generator without the -f option and see if it generated the same class twice.
Might want to look at the JavaNaming class J -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 5:18 PM To: [EMAIL PROTECTED] Subject: [castor-dev] Duplicate element names in schema? How can I get round this problem, my schema contains two transactions, Login and Submit. The Login takes a userId and password for its <authentication> while the Submit takes the password only. Castor seem to generator one _Authentication class which always assumes a userId only! I guess it can't distingush between the two <authentication> elements defined? Schema is below and I need to keep the <authentication> element for both transactions. TIA Jasbir <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault=" qualified" attributeFormDefault="unqualified"> <xs:simpleType name="_userId"> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="10"/> <xs:pattern value="[A-Z0-9]+"/> </xs:restriction> </xs:simpleType> <xs:simpleType name="_password"> <xs:restriction base="xs:string"> <xs:minLength value="1"/> <xs:maxLength value="10"/> <xs:pattern value="[A-Z0-9]+"/> </xs:restriction> </xs:simpleType> <xs:complexType name="_Authentication"> <xs:sequence> <xs:element name="userId" type="_userId"/> </xs:sequence> </xs:complexType> <xs:complexType name="_Login"> <xs:sequence> <xs:element name="Authentication"> <xs:complexType> <xs:sequence> <xs:element name="userId" type="_userId"/> <xs:element name="password" type="_password"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="_Submit"> <xs:sequence> <xs:element name="Authentication" type="_Authentication"/> </xs:sequence> </xs:complexType> <xs:element name="Transaction"> <xs:complexType> <xs:choice> <xs:element name="Login" type="_Login"/> <xs:element name="Submit " type="_Submit"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema> ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
