1
General Board / Re: XML sequence positions
« on: June 29, 2021, 06:15:14 am »
I know this is an ancient post, but in case someone finds it in a search, like I just did (again), I wanted to add a couple of things which only seem obvious now that I'm in the midst of doing this on a bunch of classes.
Remember that you may have a UML class with several properties which will turn into XML elements, whether you have stereotyped them as XSDelement or not. Connectors come after the explicit properties in the sequence of XML elements. The element name is the target role name, unless you didn't provide a role name in which case it's the class name (not the association connector name).
The Position tag applies to all the XML elements - including the explicit properties - so depending on the order you want, don't forget to count those properties as well. If you want your connectors to continue to come at the end of the list (like I do) then don't start numbering them at 0 or 1, start with the number of properties.
Finally, UML properties stererotyped as XSDattribute don't count (since they won't appear in the sequence of elements anyway).
I hope this helps some future person fix the sequence order to their liking.
Remember that you may have a UML class with several properties which will turn into XML elements, whether you have stereotyped them as XSDelement or not. Connectors come after the explicit properties in the sequence of XML elements. The element name is the target role name, unless you didn't provide a role name in which case it's the class name (not the association connector name).
The Position tag applies to all the XML elements - including the explicit properties - so depending on the order you want, don't forget to count those properties as well. If you want your connectors to continue to come at the end of the list (like I do) then don't start numbering them at 0 or 1, start with the number of properties.
Finally, UML properties stererotyped as XSDattribute don't count (since they won't appear in the sequence of elements anyway).
I hope this helps some future person fix the sequence order to their liking.