Hi,
I am writing a schema to check for empty elements in an XML file. I am able to do so for simple elements such as:
<xs:element name="authorname" type ="requiredstring"></xs:element>
by using the custom type "requiredstring" defined as:
<xs:simpleType name="requiredstring">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
But, in case of complex type elements, I am not allowed to directly specify a type for the element. I tried to use complex content to place the child elments and attributes and specify the restriction to the required string type. The complex content restriction base only accepts another complex type as its base attribute value so I am not able to specify this restriction in such a manner.
Kindly provide any suggestion regarding this OR an alternate way in which I should be able to check whether the complex elements are empty or not?
Thanks,
Sayor.