[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-dev
Subject:    Re: Other ID naming proposals (was Re: CForms widget ID naming)
From:       Bruno Dumon <bruno () outerthought ! org>
Date:       2005-11-06 8:37:06
Message-ID: 1131266226.7064.15.camel () localhost ! localdomain
[Download RAW message or body]

On Sat, 2005-11-05 at 11:20 +0100, Ugo Cei wrote:
> Il giorno 05/nov/05, alle ore 08:46, Sylvain Wallez ha scritto:
> 
> >> So let's make other proposals. Let's consider wiget  
> >> "foo.bar" (e.g. a fd:field in a fd:group) and the ID of its <input>.
> >> - "foo.bar..input": the '.' is doubled, which can never conflict  
> >> with a widget's full name
> >> - "foo.bar._input": generated element's name starts with a  
> >> character that we can forbid as the first character of widget names
> >>
> >> I prefer the first one (double '.') which is IMO more readable  
> >> than the second.
> >
> > Another one, which looks more natural: "foo.bar.input.": the  
> > trailing '.' ensures it cannot conflict with a widget's full name
> 
> The fact that it is not that readable might be a plus. The problem  
> with double dots or a dot at the end is that it's easy to miss when  
> reading the code. an extra '_' sticks out more and won't be missed as  
> easily.

agreed, +1 for the underscore

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic