How Do I Specify Attributes in a complexType XML Schema Declaration?
If you have an element based on a global complexType, the SQLType (and SQLSchema) attributes should be specified for the complexType declaration. In addition you can (optionally) include the same SQLType and SQLSchema attributes within the element declaration. The reason is that if you do not specify the SQLType for the global complexType, XML DB creates an SQLType with an internally generated name. The elements that reference this global type cannot then have a different value for SQLType.