cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: CForms last-minute change in generated input names
Date Wed, 02 Nov 2005 18:54:31 GMT
Sylvain Wallez wrote:
> Hi all,
> 
> While working on fixing issue 1672 [1], I realized that the styling 
> stylesheets in CForms generate some identifiers that may potentially 
> conflict with some widget identifiers.
> 
> Let's consider an example:
>   <fd:widget id="foo">
>   <fd:widget id="foo-input">
> 
> The produced HTML will look like this:
>   <span id="foo"><input name="foo" id="foo-input">...</span>
>   <span id="foo-input"><input name="foo-input" 
> id="foo-input-input">...</span>
> 
> The "foo-input" id is produced twice, which is obviously wrong.
> 
> To avoid this problem, I propose that all identifiers generated by the 
> styling be invalid widget IDs. Characters that are currently forbidden 
> are "/" and "." which are used in lookup paths and full names. With the 
> library stuff, we see also the ":" wich is used to identify the library 
> of the widget.
> 
> We cannot use "." in generated ids as it's what separates the widget 
> name from its parent in the full name, so we have the choice between "/" 
> and ":". I therefore propose to use ":" in generated ids:
> 
>   <span id="foo"><input name="foo" id="foo:input">...</span>
>   <span id="foo-input"><input name="foo-input" 
> id="foo-input:input">...</span>
> 
> We recently said that ids generated by the stylesheets are a public 
> contract that must be supported, so I'd like this issue to be solved 
> before 2.1.8 gets out.
> 
> Thoughts?
> 
I'm more and more worried about all these last minute changes to cforms.
 IMHO, we should have time to test everything before the release, so in
general I'm +1 on the changes as they seem to make sense for me, but
let's not release this week, let's extend the code freeze for another week.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Mime
View raw message