1
Automation Interface, Add-Ins and Tools / XSD Generation - association as ref
« on: February 18, 2009, 10:28:44 pm »
Hi all.
Is there any way to generate association between classes as ref and not as definition of an element with associated class as its type?
I define association like this:

EA generates it as:
<xs:complexType name="PartyContact">
<xs:sequence>
<xs:element name="Contact" type="con:Contact" />
</xs:sequence>
<xs:attribute name="partyContactType" use="optional" type="con:ContactType">
</xs:complexType>
But I would like to have it generated like this:
<xs:complexType name="PartyContact">
<xs:sequence>
<xs:element ref="con:Contact" />
</xs:sequence>
<xs:attribute name="partyContactType" use="optional" type="con:ContactType">
</xs:attribute>
</xs:complexType>
I'm aware, that I can define new field in class PartyContact and mark it as reference, and then EA generates XSD as I want, but I would also like to keep associations in the class diagram.
Namespace con is used in different package.
I would appreciate any help.
Is there any way to generate association between classes as ref and not as definition of an element with associated class as its type?
I define association like this:

EA generates it as:
<xs:complexType name="PartyContact">
<xs:sequence>
<xs:element name="Contact" type="con:Contact" />
</xs:sequence>
<xs:attribute name="partyContactType" use="optional" type="con:ContactType">
</xs:complexType>
But I would like to have it generated like this:
<xs:complexType name="PartyContact">
<xs:sequence>
<xs:element ref="con:Contact" />
</xs:sequence>
<xs:attribute name="partyContactType" use="optional" type="con:ContactType">
</xs:attribute>
</xs:complexType>
I'm aware, that I can define new field in class PartyContact and mark it as reference, and then EA generates XSD as I want, but I would also like to keep associations in the class diagram.
Namespace con is used in different package.
I would appreciate any help.