Unnecessary data type duplication in Import IED plugin
Describe the bug
When OpenSCD imports IEDs, in case of collision it checks the DataTypeTemplate to see if it is identical. If it is identical, no name change is required.
If it is not identical, it prefixes a new logical node with the IED name.
We have noticed that this equality check sometimes creates new DataTypeTemplates with no visible difference.
To Reproduce
Steps to reproduce the behavior:
- Go to Import IEDs
- Use the attached SCL files. (from the
XATBZA1P1...file use only theXATBZA1P1device). - After importing them both, check for changes in the DataTypeTemplates.
- Notice that although
SIUnitKind(for example) is the same, there is a new DataTypeTemplate for the EnumType id="SIUnitKind", which is called<EnumType id="XATBZA1P1SIUnitKind"> - Carry out text diff of the
SIUnitKindandXATBZA1P1SIUnitKindEnumTypes and find no difference.
Expected behavior
No new DataTypeTemplate should be created if the SCL requirements are met. Whitespace should not be considered in the creation of new DataTypeTemplates.
Screenshots
Screenshot showing the relevant EnumType:

When
XATBZA1P1_Demo_(Converted_to_FW8.40)_StandardDesignMU_v2_NoGOOSERxMap.zip
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Chrome on openscd.github.io.
Additional context
I think this is caused by our use of isEqualNode which means that XML "formatting/presentations concerns" leak into semantic differences which is true for the XML definition but not the SCL definition.
https://github.com/openscd/open-scd/blob/5bded3287bc4d448e11f12c880229f292ee47995/src/menu/ImportIEDs.ts#L178-L211
Hello there,
Thank you for opening this issue! We appreciate your interest in our project. However, it seems that this issue hasn't had any activity for a while. To ensure that our issue tracker remains organized and efficient, we occasionally review and address stale issues.
If you believe this issue is still relevant and requires attention, please provide any additional context, updates, or details that might help us understand the problem better. Feel free to continue the conversation here.
If the issue is no longer relevant, you can simply close it. If you're uncertain, you can always reopen it later.
Remember, our project thrives on community contributions, and your input matters. We're here to collaborate and improve. Thank you for being part of this journey!
It looks like is not solved completely. It is still happening to me: the collision mechanism only works when importing one single IED at the time, but importing multiple from the same SCD fails, due it adds the IEDname prefix to the LNtype only for one of them.