cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject CForms last-minute change in generated input names
Date Wed, 02 Nov 2005 18:45:27 GMT
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" 

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" 

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.




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

View raw message