How to reference a namespace in a XSD

I try to load a XSD in Mendix (XML_Schema), but it failed. I validated the XSD with an online tool and is indicates that the namespace of certain element are not referenceable, example: <xs:element xmlns:q29="" name="key" nillable="true" type="q29:Relationship" /> Type ‘q29:Relationship’ is defined in ‘’, but this is not known. How can I reference this namespace? Regards, Peter
2 answers


Mendix support examined this issue and problem is that the problematic file is the only one using UTF-16, but it misses a UTF-16 byte order mark (BOM). The Mendix modeler fails because of the missing BOM.

The quickest workaround is to convert the file to UTF-8 and reload it into the Mendix modeler. To convert the XSD you can use an editor like jedit to open the file and save it as UTF-8.

Thank to Mendix Support for their prompt responds.




Peter, could you extend your post with the error when loading the xsd in Mendix? That might contain additional information.

The reference in the element seems to be correct. There doesn't seem to be anything wrong with the definition of q29 and how you use it. But it can still be incorrect depending on how you included the original reference to q29.
So that would only leave the option open that the definition of Relationship has been done under a different namespace.

How is the type "Relationship" defined?
Is this done in the same schema? If so how and where is the xmlns declared for for Relationship? Is the Relationship specified in another imported schema? If that is the case should not declare a new namespace you want to use the previously specified namespace definition.

In other words, please provide is with a bit more information about the XSD and also include the initial definition of Relationship/