cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo <agalla...@agssa.net>
Subject Re: CForms widget ID naming (was Re: [Vote] Releasing on friday)
Date Fri, 04 Nov 2005 06:29:56 GMT
Joerg Heinicke wrote:

> On 04.11.2005 02:09, Antonio Gallardo wrote:
>
>>> Yep. The "." and "/" are already checked in 
>>> AbstractWidgetDefinition.setCommonProperties(). We just need to add 
>>> ":".
>>
>>
>> Why we need to use a symbol at any cost ? Can we use a simple word 
>> prefix? As cform-[widgetID]?
>
>
> If you prefix the widget id with a simple word (your proposal) or 
> suffix it with another one (Sylvain's way), with both you have to care 
> about the validness of user-chosen ids. To check them easily you use 
> the unique separator.


Agreed. I think checking a prefix is often faster than checking a suffix 
in a string. On the other side a prefix can rest code readibility. IMHO, 
the first is better for generated (X)HTML code.

The suffix is also ok. The problem was that a "-input" suffix is too 
generic and seems to broke some javascript code somewhere. ajax is the 
main reason for change? If yes, then we can use "-cf-input" as the 
suffix or something like that.

I am just afraid of adding a ":" in the name. Maybe does not make sense. 
Here are some points:

1-It can breaks compatibility somewhere. As sample, all browsers claims 
to support CSS standards. The point is at wich level and how they 
interpret the word "support".
2-Being in a xpath 1.0 namespace nightmare for months. I am not sure if 
suddenly somebody will need to give a meaning to the ":". I know it is 
very remote, but...

For the records, I don't have any javascript that need to be reviewed if 
we change this behavior. It is just a technical comment.

Best Regards,

Antonio Gallardo.


Mime
View raw message