Community
Participate
Working Groups
The Schema Editor should not allow two or more (global) elements with the same name to be declared. The Schema Editor should not allow two or more (local) attributes with the same name to be declared under the same parent. The editor uses attribute and element names as their IDs to uniquely identify them. As a result, they become 'linked' and things go seriously wrong. The auto-generated names will no longer overlap thanks to Bug # 196685 We need to guard against the user renaming the element or attribute to the same name as an existing one. If a duplicate name is detected, I suggest reverting the entered value to the previous uncommitted value as was done for empty element and attribute names. Note: I would consider names with the same characters but different casing to be the same (e.g. "aB" = "Ab")
Just noticed another requirement. You can copy and paste an attribute or element to create duplicates as outlined in Comment #0. You should update the paste enablement such that you cannot paste elements or attributes with duplicate names.
Created attachment 74178 [details] patch This patch was implemented slightly differently than suggested in comment 1. In the case of copy/paste/move, if the name is in use, a new name will be generated with a mechanism similar to that used to address bug 196685.
The patch does not work quite right. Copy element 'abc'. Try to paste it, you will get a new element 'abc1' and it is auto-selected. Great. However, the Element Details section still shows 'abc', not 'abc1'
Created attachment 74185 [details] fixed patch
released the patch after externalizing PDELabelUtility.