Is it possible to define in XSD the following scenario:
- Parent element has an attribute that is optional.
- If the attribute is not present in XML, at least one child element must exists.
- If the attribute is present, there can be zero or more child elements.
Example:
VALID
<parent external-source="some_name" />
<parent external-source="some_name">
<child>some value</child>
</parent>
<parent>
<child> some value</child>
</parent>
NOT VALID
<parent />