Limiting attributes of multiple elements with XML Schema

I am working with a curriculum development group and we are trying to get all of their content into an XML format so that it can be easily displayed by a browser and parsed by our application. For quiz pages we would like to do something like the following:

<question>
<text>Who won superbowl XXXII?</text>
<answer correct="false">Green Bay Packers</answer>
<answer correct="true">Denver Broncos</answer>
<answer correct="false">Dallas Cowboys</answer>
<answer correct="false">Atlanta Falcons</answer>
</question>

However, I can't find a way to limit it so that only one answer element within a question element can have a correct attribute with the value of true. Is this possible? Also of course it would be preferable to have false be the default value for the attribute so that it wouldn't be necessary for any element other than the correct answer.

Additionally, if anybody has recommendations for better methods for accomplishing the above goal or already developed XML based languages for curriculum that they have experience with that would be appreciated.
[1207 byte] By [spitzerg] at [2007-11-19 18:51:51]
# 1 Re: Limiting attributes of multiple elements with XML Schema
I don't believe you can do that in schema. You could restructure it, eg.

<question>
<text>Who won superbowl XXXII?</text>
<correctpos="2"/>
<answer pos="1">Green Bay Packers</answer>
<answer pos="2">Denver Broncos</answer>
<answer pos="3">Dallas Cowboys</answer>
<answer pos="4">Atlanta Falcons</answer>
</question>
jkmyoung at 2007-11-10 3:27:02 >