Xml schema, how to make sure one element exists with a specific attribute value
- by pexxxy
How do I enforce the existing of an element with a specific attribute value in the XML?
For example:
<events>
<event type="system" desc="this is a system event"/>
<event type="bla1" desc="this is bla1 event"/>
<event type="bla2" desc="this is bla2 event"/>
</events>
I need a rule to make sure the event element with type attribute = 'system' exists (once).
All other event elements are optional;