I’m a newbie when it comes to xml schemas. Anyway here goes my question:
I have the following element
<property name="propA">some-value</property>
and I would like my XSD to prevent empty elements, such as this:
<property name="propB" />
<property name="propC"></property>
How can I achieve this with my current XSD, as showed below:
<xs:complexType name="property">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
You can build your own simpleType for this. For example :