Book a Demo

Author Topic: Exporting a package to xsd creating dup elements  (Read 2965 times)

RyanM

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Exporting a package to xsd creating dup elements
« on: June 16, 2009, 04:25:50 am »
When I export a package containing several class definitions to XML Schema (xsd), I get several duplicate element entries. They appear to be related to connectors. Here is what the generated XSD looks like:

Code: [Select]
<xs:complexType name="Account">
    <xs:complexContent>
        <xs:extension base="BaseObject">
            <xs:sequence>
                <!-- SNIP -->
                <xs:element name="Extensions" type="Extension" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation>The list of custom fields (See: Extension) associated with a staff account.</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <!-- SNIP -->
                <xs:element name="SoftphoneSpeedDial" type="AccountSpeedDial" minOccurs="0" maxOccurs="unbounded">
                    <xs:annotation>
                        <xs:documentation>The Softphone speed dial numbers associated with a staff account. This is a replace list, meaning that if you set this field and perform an update on the record, the entire list is replaced.</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <!-- SNIP -->
                <xs:element name="Extensions" type="Extension" minOccurs="1" maxOccurs="1"/>
                <xs:element name="SoftphoneSpeedDial" type="AccountSpeedDial" minOccurs="1" maxOccurs="1"/>
            </xs:sequence>
        </xs:extension>
    </xs:complexContent>
</xs:complexType>

The reason I feel these extra elements at the end of the object are related to connectors is that if I change the "Target Role" from "SoftphoneSpeedDial" to "TEST", the generated XSD contains:
Code: [Select]
<xs:element name="TEST" type="AccountSpeedDial" minOccurs="1" maxOccurs="1"/>
Is this a bug?

RyanM

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Exporting a package to xsd creating dup elemen
« Reply #1 on: June 16, 2009, 04:27:50 am »
For reference, the record in the t_connector table of the EAP file is:
Code: [Select]
Connector_ID      Name      Direction      Notes      Connector_Type      SubType      SourceCard      SourceAccess      SourceElement      DestCard      DestAccess      DestElement      SourceRole      SourceRoleType      SourceRoleNote      SourceContainment      SourceIsAggregate      SourceIsOrdered      SourceQualifier      DestRole      DestRoleType      DestRoleNote      DestContainment      DestIsAggregate      DestIsOrdered      DestQualifier      Start_Object_ID      End_Object_ID      Top_Start_Label      Top_Mid_Label      Top_End_Label      Btm_Start_Label      Btm_Mid_Label      Btm_End_Label      Start_Edge      End_Edge      PtStartX      PtStartY      PtEndX      PtEndY      SeqNo      HeadStyle      LineStyle      RouteStyle      IsBold      LineColor      Stereotype      VirtualInheritance      LinkAccess      PDATA1      PDATA2      PDATA3      PDATA4      PDATA5      DiagramID      ea_guid      SourceConstraint      DestConstraint      SourceIsNavigable      DestIsNavigable      IsRoot      IsLeaf      IsSpec      SourceChangeable      DestChangeable      SourceTS      DestTS      StateFlags      ActionFlags      IsSignal      IsStimulus      DispatchAction      Target2      StyleEx      SourceStereotype      DestStereotype      SourceStyle      DestStyle      EventFlags
2            Unspecified            Association                  Public                  Public                              Unspecified      2      0            SoftphoneSpeedDial                  Unspecified      0      0            5      6                  SpDial                        0      0      0      0      0      0      0      0      0      1      0      -1            0                                          0      {20443283-801C-4258-90E0-3FBC91BA8699}                  0      -1      0      0      0      none      none      instance      instance                  0      0                                    Union=0;Derived=0;AllowDuplicates=0;Owned=0;Navigable=Unspecified;      Union=0;Derived=0;AllowDuplicates=0;Owned=0;Navigable=Unspecified;