XML editor: order of attributes in code completion popup

Hi,

this happens for our XSD based xml editor: just noticed that the attributes in the code completion popup are not sorted alphabetically. As far as I know, the order of attributes does not matter in XML. So, I suggest to sort them after parsing the XSD. Of course, I could also add code to do this when generating the XSD. But when using a predefined XSD file, this is not possible.

Same could also apply to the “child elements” popup, but here I am not sure whether it could cause problems. As far as I know, you suggest only valid elements, so a child element list defined as “xsd:all” could be sorted alphabetically?

Best regards

Wolfgang

Hi Wolfgang,

Thank you for reporting this problem. We have reproduced this issue and will look at it shortly.

Kind regards,
Dmitry

Hi Wolfgang,

We have just published a new version(8.1.10) to NuGet, where the issue with attribute sorting should be fixed.

Kind regards,
Dmitry

Great, many thanks! But I don’t have time to update our application, will do in the next few weeks.

Best regards
Wolfgang

I can confirm that the attribute sorting is working fine.

The elements are not sorted, but here I was not sure in my initial question whether this might cause problems.

Best regards

Wolfgang

Hi Wolfgang,

Thank you for confirming. I don’t think that elements must be sorted alphabetically. For example, sequence elements need to appear in the order defined by the schema.

Kind regards,
Dmitry

Just noticed that attribute values from an enumeration are not sorted, either. Would you consider it reasonable to sort them also alphabetically?

XSD snippet (I can send you the full XSD if necessary):

<simpleType name="FormatTerminXML_TerminFeld">
	<restriction base="string">
		<enumeration value="Leer"/> 
		<enumeration value="Other"/> 
		<enumeration value="Von"/> 
		<enumeration value="Bis"/> 
		<enumeration value="VonBis"/> 
		<enumeration value="VonBisPub"/> 
		<enumeration value="VonPub"/> 
		<enumeration value="BisPub"/> 
		...
	</restriction>
</simpleType>

Best regards

Wolfgang

Not sure about my suggestion - the author of the XSD could have had an intention when specifying the order of the enum values.
And I can easily sort the values myself when generating the XSD, so forget about my question :wink:

Best regards

Wolfgang

Hi Wolfgang,

I’ve checked in Visual Studio; it does not seem to sort enum values either.

I guess you’re right here that the schema should define the order of enum values.

Kind regards,
Dmitry