Hi,

First of all I'd like to thank you for creating this wonderfull product that 
has made my life so far a lot easier :).

Of course then I ran in to a problem with the xsd file(s) I have to use for 
communicating with a customer. The problem is as follows:

The xsd contains some elements with duplicate "element" names. Unfortunately 
these elements do not have the same child-values. I have managed to rename 
complexType objects by means of a binding file but renaming this simple type 
(containing an enumeration of possible values) does not seem to work for me. 

I attached both the xsd and binding file example I have tried. Any help to 
make renaming of these enumeration elements possible will be greatly 
appreciated. I really hope I can show my boss that choosing Java as our main 
development platform is the right choice. (other companies that will 
communicate using the xsd are using .NET technology).

Kind regards.
-Roy van der Kuil
<?xml version="1.0"?>
<!-- This file contains the binding information -->
<!-- for the invoice XML Schema -->
<!-- It is meant to be used by the Castor Source Code Generator -->

<cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding";
             defaultBindingType='element'>
     <!-- Binding the Invoice element to a class -->
     <cbf:elementBinding name="CastorTest">
        <cbf:java-class name="CT" final="true" equals="true"/>
         <cbf:elementBinding name="Object1">
            <cbf:java-class name="FirstObject" final="true" equals="true"/>
             <cbf:elementBinding name="Kind">
                <cbf:java-class name="FirstObjectKind" final="true" equals="true"/>
             </cbf:elementBinding>
         </cbf:elementBinding>
         <cbf:elementBinding name="Object2">
            <cbf:java-class name="SecondObject" final="true" equals="true"/>
             <cbf:elementBinding name="Kind">
                <cbf:java-class name="SecondObjectKind" final="true" equals="true"/>
             </cbf:elementBinding>
         </cbf:elementBinding>
     </cbf:elementBinding>
 </cbf:binding>

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" 
attributeFormDefault="unqualified" version="1.0">
  <xs:element name="CastorTest">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Object1" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Kind">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="one">
                    </xs:enumeration>
                    <xs:enumeration value="two">
                    </xs:enumeration>
                    <xs:enumeration value="three">
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Object2" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Kind">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value="four">
                    </xs:enumeration>
                    <xs:enumeration value="five">
                    </xs:enumeration>
                    <xs:enumeration value="six">
                    </xs:enumeration>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </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-user

Reply via email to