I'm trying to add extra validation to jdpl process-definition files using XSD.
We have a couple of rules we want to add; but the one that's causing me problems is that there must exist one "node" element with it's "name" attribute = "Problem".
so this is valid:
<process-definition name='sample'>
<node name="Problem">
</node>
<node name="Do Work">
</node>
</process-definition>
and this isn't
<process-definition name='sample'>
<node name="Do Work">
</node>
</process-definition>
So, to summarise, the rules I need to enforce are
- node attribute having the value "Problem"
- existence of 1 node with name="Problem"
- allowing any number of nodes with other names
Any ideas out there?