Book a Demo

Author Topic: Order of attributes in generated XML schema  (Read 4341 times)

SteveHarris

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Order of attributes in generated XML schema
« on: February 15, 2006, 05:55:18 am »
Hi,

I have a problem with the order of attributes when generating more complex XML schemas.

I am implementing an ISO standard.  In the standard I have a pair of classes A & B where B is a specialisation of A.  Class A has several attributes that will transform into elements on schema generation, one of which we will call E and with a datatype of string.

In my implementation of B (B') I want to restrict the datatype of E to an enumeration of strings.  I draw a generalisation association between B and B' and set its stereotype to be XSDrestriction.  In accordance with the rules on complex content restrictions, I then re-declare each of the elements of B in B' varying the type of E to achieve the desired result.  So far so good.

The difficulty is that the order of the elements generated from B differs from those in B' so my XML parser reports that there is an incomplete functional mapping between particles.  I can re-order the particles manually in the schema but this kind of misses the point...

Does anyone know how to work round this?

Many thanks

Steve
« Last Edit: February 15, 2006, 05:56:47 am by SteveHarris »

SteveHarris

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
Re: Order of attributes in generated XML schema
« Reply #1 on: February 17, 2006, 02:00:22 am »
Build 787 now shows the ordering buttons by default.  It seems they used to appear and dissapear according to the setting of an 'sort features alphabetically' option in tools/options/objects.

Thanks for fixing this - my schemas are now generating elements in the correct order.

Steve