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,999
Messages
2,570,243
Members
46,835
Latest member
lila30

Latest Threads

Top