Book a Demo

Author Topic: Xml schema generation / ordering of attrb/assoc  (Read 2223 times)

ChristianLO

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Xml schema generation / ordering of attrb/assoc
« on: July 29, 2011, 06:51:32 pm »
Dear all,

we're using EA to create xml schemas from a logical UML class model.
The classes have attributes and associations. An association can be a composite or not. We transform this model into a xsd ( transform current package ) and generate the xml schema from that xsd.
The template for schema generation ( last step ) respects the ordering of attributes, but not for associations.
We need one common ordering for attributes and association during schema generation, because all new composites and attributes must be appended to the complex type in xml. I.e. if we add a new composite, the related attributes has to be appended to the list of attributes.

Sample ( ordering in UML neglected )
Old:
UML                                            Xml
Class One                                   complex type One
   int a;                                            int a;
   composite to Two;                         complex type two;

New 1:
UML                                            Xml
Class One                                   complex type One
   int a;                                            int a;
   int b;                                            complex type two;
   composite to Two;                         int b;
        

New 2:
UML                                            Xml
Class One                                   complex type One
   int a;                                            int a;
   int b;                                            complex type Two;
   composite to Two;                         int b;
   composite to Three;                       complex type Three;