I'm trying to validate a XML with a given XSD. But I'm continuously getting the following error.
cvc-elt.4.2: Cannot resolve 'MyType' to a type definition for element 'Test'.
XML
<notifications xmlns="http://soap.sforce.com/2005/09/outbound">
<Notification>
<Test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="MyType">
<Id>a2L1g000000OzM7EAK</Id>
</Test>
</Notification>
</notifications>
XSD
<xs:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://soap.sforce.com/2005/09/outbound" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="notifications">
<xs:complexType>
<xs:sequence>
<xs:element name="Notification">
<xs:complexType>
<xs:sequence>
<xs:element name="Test">
<xs:complexType>
<xs:sequence>
<xs:element name="Id" type="xs:string" />
</xs:sequence>
<xs:anyAttribute processContents="skip"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>