XSD constraint : highest attribute value in an element

S

Stone

Dear all

If I have the following xml file :

<myxml>
<body>
<text>My text</text>
<num_attach>2</num_attach>
</body>
<file id="1">
user32.dll
</file>
<file id="2">
user.dat
</file>
</myxml>

How can I express (using xml schema) that the value of <num_attach>
element must be equal to number of occurences of <file> elements (the
highest value of the id) ?


Thanks in advance,
Stone
 

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

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top