Schema TypeName Types and RootNode TypeName – collides

I was getting this error first “namespace attribute of an import must not match the real value”.

I had a group schema, that had a repeating record of a second schema. That second schema did not have any Target Namespace, to match what a trading partner had given us.

This StackOverflow article reminded me that there are times to use INCLUDE instead of IMPORT.  So in the group schema, I clicked on <Schema> in the upper left of the Schema Editor/Viewer.  Then I used the “Imports” in the property window to delete the Imports of my second schema, and change it to an Includes.  I actually had trouble deleting it, and had to edit the schema.xsd in Notepad.  Then I had to re-add the record and reassociated the DataStructure property.

When I did the above, I started getting this error:
BEC2017: Node “” – This schema file has a TypeName that collides with the RootNode TypeName of one of its root nodes. Make sure that they are different.

This old blog by Stephen Thomas (on GeeksWithBlogs) helped. I realized I needed to click on the .xsd in the Solution Explorer, and just change the schema File Type.  I simply added the word “Type” on the end of what was already there.


I got the same error today (4/23/2019) when I accidentally had two root nodes. In the schema below, my intent was to put LineItems under POAck, but I got in a hurry and it was a top level node and gave the error mentioned above. I just moved under POAck, as a sibling to Messaging and Header, and the error went away.


Leave a Reply