Scott,

At the risk of sounding pedantic (rats, too late):

If the point hasn't been already been made, I can't think of a language
that allows digits as the first character of an identifier.  Lexical
units starting with digits are assumed to be numbers.  '4NAME' might
seem harmless, but against conventions like '4L' ( long suffix, and
several other similar ones in the 'C' world), it's gets confusing in a
hurry.

> Scott Palmer wrote:
> > Hello all,
> > 
> > I have an existing project that already has a simple template engine 
> > that I would like to replace with Velocity.  As much as possible I would 
> > like to support the existing format of the template files that I already 
> > have.
> > 
> > My existing files have numbered properties that I access by placing a 
> > dot '.' followed by an integer after the property name.  E.g.   
> > CLIENTS.0  would refer to the first client, CLIENTS.COUNT would refer to 
> > the number of clients.  CLIENTS.0.NAME would refer to the name of the 
> > first client, etc.
> > 
> > I'm wondering if there is any hope of keeping that format when moving to 
> > Velocity.  That is, I wonder if the changes required to velocity to 
> > support a leading digit in a (sub)property name would be small enough 
> > that I would have any hope of making such a change on my own having 
> > never seen the Velocity code and not wanting to spend much time tweaking 
> > it.  I was thinking that I could use the existing support for looking up 
> > values in a Map object with some small modification that would result in 
> > the ability to allow numeric strings (e.g. "0") to be used as a key for 
> > the lookup.
> > 
> > I have a backup plan to change the syntax to something like CLIENTS(0) 
> > if I have to, but that would mean that my customers would have to make 
> > much more significant changes to their existing templates.
> > 
> > Should I attempt to tweak Velocity into accepting my existing syntax, or 
> > is it simply going to be too much work?  (It wont take much to make it 
> > "too much".)
> > 
> > Thanks,
> > 
> > Scott
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
 - michael dykman
 - [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to