Hi,
I noticed a difference between AS4 and AS6 regarding the generated Content XML of CompoundWidgets.
Environment:
- AS4: 4.12.5.95 SP / mapp View: 5.24.3
- AS6: 6.5.3.11 SP / mapp View: 6.8.0
- Reproducible with multiple CompoundWidgets
For testing, I created a very simple CompoundWidget with two custom properties:
<Property xsi:type="NonBindableProperty"
name="Property1"
type="Number"
defaultValue="1"
required="true">
<Mappings>
<Mapping widget="no1" property="value" />
</Mappings>
</Property>
<Property xsi:type="NonBindableProperty"
name="Property2"
type="Number"
defaultValue="2"
required="true">
<Mappings>
<Mapping widget="no2" property="value" />
</Mappings>
</Property>
In AS4, when an instance of the CompoundWidget is created, the generated Content XML contains:
<Widget xsi:type="widgets.widgetlibrary_1.compoundwidget_0"
id="compoundwidget_01"
top="600"
left="580"
zIndex="11"
Property1="1"
Property2="2" />
In AS6, the generated XML contains:
<Widget xsi:type="widgets.widgetlibrary_0.compoundwidget_0"
id="compoundwidget_01"
top="600"
left="300"
zIndex="16"
Property2="2"
Property1="1" />
The properties Property1 and Property2 are now swapped.
Interestingly, this happens immediately after dragging the widget from the toolbox into the WYSIWYG editor. No property modification is required.
Additional observations:
- Widget functionality is identical.
- The Property Grid displays the properties in the expected order (Property1, Property2).
- The effect is visible only in the generated XML.
- The behavior is reproducible with several CompoundWidgets.
- At first glance, the ordering appears to be reverse alphabetical, although I have not fully verified this yet.
I understand that XML attribute order is generally semantically irrelevant. However, from a maintainability perspective I would prefer a deterministic and, ideally, configurable ordering.
We use far more than two properties in our CompoundWidgets.
My questions are:
- What determines the order of custom CompoundWidget properties in AS6?
- Is the XML attribute order intentionally different from AS4?
- Is there any supported way to influence the generated attribute order?
- Can the order be defined explicitly in the CompoundWidget definition?
- Is there a way to enforce alphabetical ordering?
- Has anyone found a solution or workaround to keep XML diffs cleaner in Git/SVN and XML comparison tools?
The reason I am asking is that I occasionally inspect visualization settings directly in the XML. Different attribute ordering also creates unnecessary diffs when comparing projects, reviewing changes, or migrating projects from AS4 to AS6.
Thank you very much for your input and experience.
Best regards,
Simon ![]()