XSD constraint : highest attribute value in an element

Stone

Usenet Archive
Joined
Mar 18, 2002
Messages
36
Reaction score
0
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

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top