[prev in list] [next in list] [prev in thread] [next in thread]
List: xml-cocoon-dev
Subject: Re: [VOTE] Naming rule for HTML IDs generated by CForms
From: Ezkovich Glen <gezkovich () austin ! rr ! com>
Date: 2005-11-07 1:05:11
Message-ID: 2295C808-6F83-417B-A44B-B6F4BBD9BFEE () austin ! rr ! com
[Download RAW message or body]
On Nov 6, 2005, at 4:13 PM, Sylvain Wallez wrote:
> Jean-Baptiste Quenot wrote:
>> * Sylvain Wallez:
>>
>>
>>> The main point being that this rule *must* ensure that
>>> generated IDs can never conflict with widget full names (e.g.
>>> "foo.bar-input" would potentially conflict with a "bar-input"
>>> widget sibling of "bar").
>>>
>>
>> Then why don't you use a « reserved » keyword inbetween, such as
>> « bar-___reserved_cforms_input___ »?
>>
>
> Because I'm concerned by the length of these generated IDs that
> will clutter up the page.
I understand this concern but in general I think distinguishing
between auto generated names (ids) and author generated names is a
good idea. A convention for auto generated names is to begin them
with "_". In this case it can conflick with auto-generated widget
names. A simple convention for naming in this case could be simply to
use something along the lines of foo.bar._cfInput or, since this
likely will step on some widget names, foo.bar._agInput (ag for auto-
generated). A concern here is that root of the ID is somewhat
obscured. An alternative naming would be along the lines of
foo.bar.cf_input. While not following the more general convention it
comes close. (I'm sure someone will confuse it for a column name ;-).)
While there remains clutter it is significantly reduced to 3
characters per id. A minimal amount considering the clarity it brings.
Glen Ezkovich
HardBop Consulting
glen at hard-bop.com
A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to
worry about answers."
- Thomas Pynchon Gravity's Rainbow
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic