You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Sylvain Wallez <sy...@apache.org> on 2005/11/02 19:45:27 UTC
CForms last-minute change in generated input names
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?
Sylvain
[1] http://issues.apache.org/jira/browse/COCOON-1672
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: CForms last-minute change in generated input names
Posted by Carsten Ziegeler <cz...@apache.org>.
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/