Arnaud,

I can't see how prefixing the complexType class names will solve the
problem. The heart of the problem is the duplicate use of the element
<Authentication>?

Jasbir



                                                                                       
                             
                          "Arnaud                                                      
                             
                          Blandin"            To:      [EMAIL PROTECTED]           
                             
                          <blandin@intal      cc:                                      
                             
                          io.com>             Subject:      Re: [castor-dev] Duplicate 
element names in schema?     
                                                                                       
                             
                          09/12/2002                                                   
                             
                          17:37                                                        
                             
                          Please respond                                               
                             
                          to castor-dev                                                
                             
                                                                                       
                             
                                                                                       
                             




Hi Jasbir,

Using the CVS version you could use a binding file if you don't want to
alterate your XML Schema.
The following is a very basic binding file that prefixes all complexType
class names with Type:
<?xml version="1.0"?>

<cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding";
             defaultBindingType='element'>

     <cbf:namingXML>
          <cbf:complexTypeName>
              <cbf:suffix>Type</cbf:suffix>
          </cbf:complexTypeName>
     </cbf:namingXML>
 </cbf:binding>

Hope that helps,

Arnaud

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 09, 2002 6: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.

Reply via email to