XML Schema - limit occurrence

M

mrc-1

Hi,

i'd like to validate my XML file (see below) using XML Schema.

Now my question: is it possible to limit the occurrence of the element
b in the data element.
I mean: data can contain up to 10 b elements, but it doesn't matter how
the b elements are allocated in the elements a and c.

Any help would be appreciated -- thank you!


XML File (shall be valid)
<data>
<a>
<b>...</b>
<b>...</b>
<b>...</b>
<b>...</b>
</a>
<c>
<b>...</b>
<b>...</b>
</c>
</data>


XML File (shall be valid too)
<data>
<a>
<b>...</b>
<b>...</b>
<b>...</b>
</a>
<c>
<b>...</b>
<b>...</b>
<b>...</b>
<b>...</b>
</c>
</data>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top