Hi all,

In order to finally get 2.1.8 out, we have to define once the naming rule for HTML IDs generated by the CForms stylesheets.

Let's give some background for those who haven't followed the discussion.

CForms stylesheets produce "container elements" for fields, that include the <input> itself and other information such as the validation error, help popup, calendar icon, etc. So a widget whose full name is e.g. "foo.bar" (field "bar" in group "foo") would be output as:

<span id="foo.bar"><input name="foo.bar" id="foo.bar:input"> (help, cal, etc.) </span>

We see here a generated id for the input. The question is what name rule should be used to produce generated IDs, not only for this input, but also for the help, calendar, and any other "synthetic" elements created by the stylesheets. The main point being that this rule *must* ensure that generated IDs can never conflict with widget full names (e.g. "foo.bar-input" would potentially conflict with a "bar-input" widget sibling of "bar").

To find this naming rule, we have to consider that:
- widget names cannot contain the '/', '.' and ':' characters.
- HTML IDs must begin with a letter [1] although XML IDs can also start with '_' and ':' [2] - we should be able to use generated IDs in CSS rules. We've seen that IE requires ':' to be written using the '\3A' unicode escape which isn't really user friendly.

There has been a number of proposals, and a number of different opinions about them.

So please choose one proposal below:

[ ] "foo.bar:input"  (colon, not CSS-friendly because of IE)
[ ] "foo.bar..input" (double period)
[ ] "foo.bar.input." (trailing period)
[ ] "foo.bar._input" (underscore, requires to forbid it as the beginning of widget names)

Cast your votes!

Sylvain

[1] http://www.w3.org/TR/REC-html40/types.html#type-id
[2] http://www.w3.org/TR/REC-xml/#id

--
Sylvain Wallez                        Anyware Technologies
http://people.apache.org/~sylvain     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director

Reply via email to