During testing I discovered that the preference element is under
specified (sorry, y'all!). It is not clear what the user agent is
supposed to do when encountering the following:
<preference name="a" value="a"/>
<preference name="a" value="b"/>
<preference name="a" value="c" readonly="true"/>
<preference name="a" value="d"/>
<preference name="a" value="e" readonly="false"/>
Options:
1. <preference name="a" value="a"/> wins (subsequent repetitions are
ignored by the UA, which is how non-repeat elements work already).
2. the 'widget preferences list' end up with 5 preferences named "a",
but with different values. Then the Widgets A&E spec can sort out the mess.
3. Each subsequent repetition resets the value of the preference, and
if it is read-only or not. In the following case, when value is set to
d, the use agent sets will set the readonly value to 'false':
<preference name="a" value="b"/>
<preference name="a" value="c" readonly="true"/>
<preference name="a" value="d"/>
My preference is 3 because that is how I would expect it to behave.
However, 1 might be more "correct".
Kind regards,
Marcos