Is there a way to refer to a group of non-nested XML tags in XSD schema, e.g.:
<foo>
<a>a_val</a>
<b>b_val</b>
<c>c_val</c>
<d>d_val</d>
</foo>
<bar>
<e>e_val</e>
<b>b_val2</b>
<c>c_val2</c>
<f>f_val</f>
</bar>
What I want to achieve is to have tags <b>
and <c>
extracted separately as complexType or abstract element, because the very same <b>...</b><c>...</c>
sequence might appear elsewhere (as in this example, inside <bar>
). Is this possible?
I have also considered defining base object, and deriving <foo>
and <bar>
from it. However I would prefer lighter solution if possible due to nature of the real-life data.
Thanks in advance.