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 externel-source="some_name" />
<parent externel-source="some_name">
<child>some value</child>
</parent>
<parent>
<child> some value</child>
</parent>
NOT VALID
<parent />
No i think not.