Common Schema Error: a TypeName that collides with the root node name

Problem:
When importing or creating schemas, it is possible that you will encounter this error:

This schema file has a Type Name that collides with the RootNode TypeName of one of its root nodes. Make sure that they are different.

The Cause:
The Biztalk 2004 editor creates a .net class for the XSD and top level element nodes in your schema. If they share the same name, a .net class type name collision will occur.

The Solution:
Changing the schema rootnode is often not possible (particularly if you are dealing with standards based schemas). I therefore suggest that you change the Type Name for the XSD. To do this:

1) Click on the XSD in question. Click the properties tab (Do not right click and choose properties, as this is something else).
2) Change the Type Name so that is does not match any of the top level elements (including the rootnode). I suggest adding the word "Type" at the end.
3) Re-compile and verify that the error is now gone.



posted @ 2006-04-03 09:44  upzone  阅读(572)  评论(0编辑  收藏  举报