<xs:element name="qualificationRequired" type="ExtendedQualification"/>
<xs:complexType name="ExtendedQualification">
<xs:complexContent>
<xs:extension base="qualifications">
<xs:element name="other">
<xs:element name="skills" type="xs:string"/>
<xs:element name="languages" type="xs:string"/>
</xs:element>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:sequence>
</xs:complexType> //closes another complexType above
My validator returns the following errors:
Validator Error: s4s-elt-must-match.1: The content of ‘sequence’ must
match (annotation?, (element | group | choice | sequence | any)*). A
problem was found starting at: complexType. LINE 2Validator Error 2: src-resolve: Cannot resolve the name
‘ExtendedQualification’ to a(n) ‘type definition’ component. LINE 1
why is this happening?
<xs:sequence>can not contain an<xs:complexType>as a child. You have to put it elsewhere. Either wrap it in an element, effectively making it a nested type, or put it directly in the<xs:schema>element as a global type.Just as the error message says, the only tags you can put inside an
<xs:sequence>are:<xs:element><xs:group><xs:choice><xs:sequence><xs:any>Also,
<xs:extension>cannot have<xs:element>tags as children. You have to wrap them in an<xs:sequence>,<xs:choice>,<xs:all>, etc. depending on what you want to achieve.Finally,
<xs:element>can’t contain other<xs:element>tags as children. You have to wrap them in a sequence/choice/all, etc. and then in<xs:complexType>to define a nested type. Or move it all outside to serve as a global type.Here’s a valid document defining what you’re trying to do above. I don’t have insight into the whole document though, so it might need adjustments depending on the context.