D
Don Adams
I don't think what I want to do with maxInclusive is possible, but
I thought I'd ask others what they thought. As an example,
here is some very simple XML:
<birthday_cake>
<max_pieces>8</max_pieces>
<serving name="Joe">
<pieces>2</pieces>
</serving>
<serving name="Jane">
<pieces>1</pieces>
</serving>
</birthday_cake>
Is it possible to write a Schema rule to ensure that the maxInclusive
restriction
for <pieces> is equal to the value of <max_pieces>? In other words,
to ensure that no serving contains more pieces than the max_pieces for
the birthday_cake.
Now for the real stretch, is it possible to write a Schema rule to ensure
that the total of all <pieces> under <birthday_cake> is less-than or
equal-to the value of <max_pieces> for <birthday_cake>?
I thought I'd ask others what they thought. As an example,
here is some very simple XML:
<birthday_cake>
<max_pieces>8</max_pieces>
<serving name="Joe">
<pieces>2</pieces>
</serving>
<serving name="Jane">
<pieces>1</pieces>
</serving>
</birthday_cake>
Is it possible to write a Schema rule to ensure that the maxInclusive
restriction
for <pieces> is equal to the value of <max_pieces>? In other words,
to ensure that no serving contains more pieces than the max_pieces for
the birthday_cake.
Now for the real stretch, is it possible to write a Schema rule to ensure
that the total of all <pieces> under <birthday_cake> is less-than or
equal-to the value of <max_pieces> for <birthday_cake>?