i have created basic xsd successfully however I want to add restriction for the element that it should be present and contains atleast one character. it also has 4 attributes. i am facing problem in adding restriction since I can not use simple type as the element has attributes.
Please suggest something
thanks in advance
Added XSD data posted by OP in comments (sic)
<xs:element name="Engines">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="Engine" />
</xs:sequence>
<xs:attribute name="Count" use="required" type="xs:integer" />
</xs:complexType>
</xs:element>
<xs:element name="Engine">
<xs:complexType>
<xs:sequence>
<xs:element name="Model" type="Model"/>
<xs:element ref="SerialNumber" />
</xs:sequence>
</xs:complexType>
</element>
<xs:simpleType name="trimValueType">
<xs:restriction base="xs:string">
<xs:minLength value="1"></xs:minLength>
<xs:whiteSpace value="collapse"></xs:whiteSpace>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="Model">
<xs:simpleContent>
<xs:extension base="trimValueType">
<xs:attribute name="ATTRIBUTE" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<Engines count = 1> <Engine> <Model ATTRIBUTE = "r\w"> </Model> <SerialNumber ATTRIBUTE = "r/w">1234567</SerialNumber> <Engine> <Engines>