I have received a XSD schema MainSchema.XSD and also Common.Xsd schema.
In MainSchema.xsd i have a following line:
<xs:include schemaLocation="Common.xsd"/>
And Common.Xsd hold a definition for various types of data like:
<xs:simpleType name="SSN">
<xs:annotation>
<xs:documentation>Social security number is 10 digits</xs:documentation>
<xs:appinfo>
<altova:exampleValues>
<altova:example value="5412983209"/>
<altova:example value=""/>
</altova:exampleValues>
</xs:appinfo>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:whiteSpace value="collapse"/>
<xs:pattern value="([0-9]{10})?"/>
</xs:restriction>
</xs:simpleType>
and in MainSchema i have a property called SSNField of type SSN:
<xs:attribute name="CompanySSN" type="SSN">
<xs:annotation>
<xs:documentation>SSN number of Company</xs:documentation>
</xs:annotation>
</xs:attribute>
When i create a c# object class with this command:
xsd.exe -c -l:c# MainSchema.xsd Common.Xsd
it then created a object called:
MainSchema_Common.cs
When i validate an object against this Schema it comes up with an Exception:
{"Type 'http://schemas.domain.com:SSN' is not declared, or is not a simple type."}
Does anyone knows what i´m doing wrong ?
Bear in mynd that i received this XSD schemas from a outside source and i was told that there were no errors in this files.
Sincerly agh