Community
Participate
Working Groups
If a namespace declaration needs to be added by its default prefix is already in use, the XML binding code doesn't handle it correctly. It either overwrites the previous definition or fails to insert the new definition in the correct location (depending on the DOM implementation). Let's say you are starting with this document... <y:root xmlns:y="http://www.eclipse.org/sapphire/tests/xml/binding/0007/x" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> </y:root> ... and you need to add element "child" with default namespace that prefers prefix "y"... you want XML binding code to resolve this problem by generating a unique prefix for the new namespace, creating a document such as this... <y:root xmlns:y="http://www.eclipse.org/sapphire/tests/xml/binding/0007/x" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y1="http://www.eclipse.org/sapphire/tests/xml/binding/0007/y"> <y1:child>abc</y1:child> </y:root>
Fixed and added corresponding unit test... TestXmlBinding0007.
Verified in unit test.