cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject [VOTE] Naming rule for HTML IDs generated by CForms
Date Sun, 06 Nov 2005 10:51:39 GMT
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. 
"" (field "bar" in group "foo") would be output as:

  <span id=""><input name="" id=""> (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. 
"" 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:

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

Cast your votes!



Sylvain Wallez                        Anyware Technologies
Apache Software Foundation Member     Research & Technology Director

View raw message