- From: Ian Hickson <ian@hixie.ch>
- Date: Wed, 25 Aug 2004 23:08:55 +0000 (UTC)
On Mon, 9 Aug 2004, [ISO-8859-1] Olav Junker Kj?r wrote: > > I would like to get rid of the "index" attribute on fields in xml formdata. I > think it binds the server side processing too tightly to the UI, by relying on > the document order of controls. > > If I understand correctly, the role of the index is for identifying controls > in the case where controls cannot be identified only by name (and perhaps > value). E.g. when several text field in the same form has the same name. > > I think it is a reasonable trade-off, to require that fields (apart from check > boxes and radio buttons) should be uniquely named (in the form scope), and > that values should be unique for check boxes and radio buttons with the same > name, and for options in a select. I agree that _if the author writes the form according to the guidelines you just described_, he shouldn't need to give the index attribute. So I've made it optional and defaulting to 0. I also special-cased radio buttons and checkboxes so that if the attribute is omitted, it'll use the value to work out which one should be set. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 25 August 2004 16:08:55 UTC