On Thu, 2008-12-04 at 11:41 +0100, Michael Brauer - Sun Germany - ham02
- Hamburg wrote:
> If I recall it correctly, then the way it works in HTML is as follows:
>
> - Radio buttons are indeed grouped by their name.
> - For Javascript, all radio buttons that have the same name are combined
> into an array, so that the access to the individual button is possible.
> - There is further the possibility to access radio buttons like any
> other HTML element by their ID attribute.
That is correct.
> ODF like HTML uses the name for grouping.
> In ODF 1.0/1.1 we had a form:id attribute for all controls, including
> radio buttons. We have consolidated that for ODF 1.2, so that these now
> have an xml:id.
>
> That means: It is possible to identify controls by their ID, or by their
> name (which is also used for grouping). And it is in particular possible
> to assign an ID to a radio button in addition to a name. I'm therefore
> not sure if I do understand what is missing here, or why we should
> require a third name or ID, which in any case does not make things easier.
What's missing is that I didn't know about the addition of xml:id, nor
did anyone else I conferred with. xml:id should be a workable answer,
and I'll work on supporting this.
> Well, it is true that the script engine of OpenOffice.org does use the
> name of controls to access them rather then their ID and that there
> currently is no UI support for xml:id. But these are details of the
> implementation. The script engine may also search for the ID of controls
> if this is more appropriate.
A related question is one of naming: is it acceptable within the script
engine to have two different names for the same control? If not, then
xml:id could pose problematic. I don't know if the ODF standard says
anything about this scenario.
Thanks,
- Jon