I am newbie to XML.
I am validating one XML/XSD file. But Eclipse is throwing below validation error
s4s-elt-invalid-content.1
Here’s the code where it’s having issues in XSD.
<complexType name="Check_String">
<complexContent >
<extension base="tns:Boolean"/>
</complexContent>
<complexContent >
<extension base="tns:String"/>
</complexContent>
</complexType>
I am not sure how to solve this. Can any one explain why this error and workaround.
because of this validation of XML fails
<attribute name="Reset password Call Barring" xsi:type="tns:Check_String" nillable="true" vdsl2Name="PSWD">
<conditions when="BADPAYER_DisableAllForPSTN" enabled="false"/>
</attribute>
The content model of a complex type must consist of ‘annotation’ (if present); followed by zero or one of the following: ‘simpleContent’, ‘complexContent’, ‘group’, ‘choice’, ‘sequence’, or ‘all’; followed by zero or more ‘attribute’ or ‘attributeGroup’; followed by zero or one ‘anyAttribute’.
Here you’re showing two
complexContent.I assume that in your case, the default namespace is http://www.w3.org/2001/XMLSchema
It is hard to say what you’re trying to achieve; if these would be simple types, then maybe a union might help you instead, if you were trying to go after allowing both types…
UPDATE: this is an example of a union: