The XML (simplified):
<?xml version="1.0" encoding="UTF-8"?>
<mx:XMLimport xmlns:mx="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Leverancier>nn</Leverancier>
<Bestandsversie>1.1.0.0</Bestandsversie>
</mx:XMLimport>
The XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:element name="XMLimport">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Leverancier" type="xsd:string" minOccurs="1"/>
<xsd:element name="Bestandsversie" type="xsd:string" minOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
If I remove the mx:
prefix from the root element of the XML it validates just fine. I'm lost in name spaces and I'm searching the internet for several hours now. I can't change the XML so the XSD have to be adapted to allow the mx:
prefix. The validator gives this error:
ERROR: Element '{http://www.w3.org/2001/XMLSchema}XMLimport':
No matching global declaration available for the validation root.