John,
I don't run with -f and still get the same problem.
Renaming
"Weir, John"
<john.weir@gs. To: [EMAIL PROTECTED]
com> cc:
Subject: Re: [castor-dev] Duplicate
element names in schema?
09/12/2002
17:29
Please respond
to castor-dev
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
==================================================
HFC Bank Disclaimer
The information in this Email belongs to HFC Bank plc. It is intended for the use of
the individual or entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable law. If you are
not the intended recipient, you are hereby notified that any disclosure, copying,
distribution or the taking of any action in reliance on the contents of this Email is
prohibited. If you have received this Email in error, please notify us immediately by
telephone on 01344 890000 and delete the Email from your system and destroy all copies
which you have made of the same. Thank you.
HFC Bank plc Company Registration Number - 1117305 England
Registered Office: North Street, Winkfield Berkshire SL4 4TD.