Hi,

I have one problem on generating code through a XML Schema.
Under these lines, I have copied the XML schema and the Binding file that I
have used. The problem is that I expected that in the java Class
"ATCUplinkMsgElementIdComplexType.java" it would be the following
attributes :
      private test.SpeedSpeedComplexType _um110SpeedSpeedElement;
      private test.SpeedComplexType _um111SpeedElement;
But the result that I have had, is the following :
      private test.Um110SpeedSpeedElement _um110SpeedSpeedElement;
      private test.SpeedComplexType _um111SpeedElement;
And the java class "Um110SpeedSpeedElement" doesn't exist.

I have done some tests and if I change the name of the type "SpeedSpeed" by
"SpeedSpeedX", it works. But, as I said, they were test on a simplified
file because on the file that I am working on is bigger than 100kB and I
have always problems, with "SpeedSpeed" or with "SpeedSpeedX" or with
"XSpeedSpeed". As I said, on the "test.xsd", if I change all the
apparitions of the type "SpeedSpeed" from "SpeedSpeed" to "SpeedSpeedX" it
works, and the results are:
      private test.SpeedSpeedXComplexType _um110SpeedSpeedElement;
      private test.SpeedComplexType _um111SpeedElement;

I don't know why I have this problem and neither why, on the big file, my
solution doesn't work.

Thanks,
Inaki

"test.xsd" : (XML Schema)

<?xml version="1.0"?>
<!-- This file was generated by the Objective Systems ASN2XSD Compiler
     (http://www.obj-sys.com).  Version: 0.1B, Date: 04-Aug-2004. -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
            xmlns="http://www.obj-sys.com/CpdlcTypes";
            targetNamespace="http://www.obj-sys.com/CpdlcTypes";
            xmlns:objsys="http://www.obj-sys.com/v1.0/XMLSchema";
            elementFormDefault="qualified">

   <!-- PDU definition -->
   <xsd:element name="speedIndicated" type="SpeedIndicated"/>
   <xsd:simpleType name="SpeedIndicated">
      <xsd:restriction base="xsd:integer">
         <xsd:minInclusive value="0"/>
         <xsd:maxInclusive value="400"/>
      </xsd:restriction>
   </xsd:simpleType>

      <!-- PDU definition -->
   <xsd:element name="speed" type="Speed"/>
   <xsd:complexType name="Speed">
      <xsd:choice>
         <xsd:element name="speedIndicated" type="SpeedIndicated"/>
      </xsd:choice>
   </xsd:complexType>

      <!-- PDU definition -->
   <xsd:element name="speedSpeed" type="SpeedSpeed"/>
   <xsd:complexType name="SpeedSpeed">
      <xsd:sequence minOccurs="2" maxOccurs="2">
         <xsd:element name="speed" type="Speed"/>
      </xsd:sequence>
   </xsd:complexType>

      <!-- PDU definition -->
   <xsd:element name="aTCUplinkMsgElementId" type="ATCUplinkMsgElementId"/>
   <xsd:complexType name="ATCUplinkMsgElementId">
      <xsd:choice>
         <xsd:element name="um110SpeedSpeed" type="SpeedSpeed"/>
         <xsd:element name="um111Speed" type="Speed"/>
      </xsd:choice>
   </xsd:complexType>

</xsd:schema>

"bind.xml" : (Binding file)

<?xml version="1.0"?>
<cbf:binding xmlns:cbf="http://www.castor.org/SourceGenerator/Binding";
      defaultBindingType='type'>
      <cbf:namingXML>
            <cbf:complexTypeName>
                  <cbf:suffix>ComplexType</cbf:suffix>
            </cbf:complexTypeName>
            <cbf:elementName>
                  <cbf:suffix>Element</cbf:suffix>
            </cbf:elementName>
            <cbf:modelGroupName>
                  <cbf:suffix>ModelGroup</cbf:suffix>
            </cbf:modelGroupName>
      </cbf:namingXML>
</cbf:binding>


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to