When using nested complex types, XSD generated by Studio is not correct :
A typical output would be
<xs:complexType name="intcmn_sourceType"> <xs:sequence> <xs:element name="audience" type="nxs:stringList"/> <xs:element name="date" type="xs:date"/> <xs:element name="geography" type="nxs:stringList"/> <xs:element name="sensitive" type="xs:boolean"/> <xs:element name="source_description" type="xs:string"/> <xs:element name="source_language" type="nxs:stringList"/> <xs:element name="source_name" type="xs:string"/> <xs:element name="url" type="xs:string"/> <xs:element name="source_eval" type="nxs:intcmn_source_evalType"/> <xs:complexType name="intcmn_source_evalType"> <xs:sequence> <xs:element name="data_credibility" type="xs:string"/> <xs:element name="source_reliability" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:sequence> </xs:complexType>
where as a valid generation would be to make the sub type declaration "at root level"
<xs:complexType name="intcmn_sourceType"> <xs:sequence> <xs:element name="audience" type="nxs:stringList"/> <xs:element name="date" type="xs:date"/> <xs:element name="geography" type="nxs:stringList"/> <xs:element name="sensitive" type="xs:boolean"/> <xs:element name="source_description" type="xs:string"/> <xs:element name="source_language" type="nxs:stringList"/> <xs:element name="source_name" type="xs:string"/> <xs:element name="url" type="xs:string"/> <xs:element name="source_eval" type="nxs:intcmn_source_evalType"/> </xs:sequence> </xs:complexType> <xs:complexType name="intcmn_source_evalType"> <xs:sequence> <xs:element name="data_credibility" type="xs:string"/> <xs:element name="source_reliability" type="xs:string"/> </xs:sequence> </xs:complexType>
or make a real "inline" declaration
<xs:complexType name="intcmn_sourceType"> <xs:sequence> <xs:element name="audience" type="nxs:stringList"/> <xs:element name="date" type="xs:date"/> <xs:element name="geography" type="nxs:stringList"/> <xs:element name="sensitive" type="xs:boolean"/> <xs:element name="source_description" type="xs:string"/> <xs:element name="source_language" type="nxs:stringList"/> <xs:element name="source_name" type="xs:string"/> <xs:element name="url" type="xs:string"/> <xs:element name="source_eval" type="nxs:intcmn_source_evalType"> <xs:complexType> <xs:sequence> <xs:element name="data_credibility" type="xs:string"/> <xs:element name="source_reliability" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>