Great. See my previous reply. If you would like to help me find the
problems, that's wonderful. Let me know.
geir
Jose Alberto Fernandez wrote:
>
> I guess some people had problem reading my previous message.
> Here it goes again on plain text.
>
> Hi,
>
> I started really experimenting with Velocity this weekend and got a bunch of
> extrange
> behavior, that I do not understand:
>
> 1) I could not use "-", "_", nor numbers in macro identifiers, got grammar
> errors.
> Things started to work when I remove them. However the tests suit and
> the documentation,
> and the grammar seem to say otherwise.
>
> 2) Given a macro, xyz, with no arguments, the documentation says invocation
> is: #xyz()
> however, that would put "()" as part of the output. I had to use #xyz
> without parentesis.
>
> So, is this some but somewhere? a non commited change to the grammar? Or
> what.
>
> Some other things I noticed was that when evaluating macros, the entire body
> of the macro
> gets reparsed everytime the macro is expanded. That seems like a very costly
> operation
> when one has lots of macros (in my case I have lots and they are heavily
> called) I am
> doig XML-XML translations with this.
>
> I can see that such an approach is needed for interpolation (having snippets
> of code
> expanded in place on the macro) but for that small use it seems that the
> price is
> too big. An #eval($code) directive that specializes on this kind of thing
> seems to me
> to be more approrpiate. This can really speed things up, at least in my
> case.
>
> Am I misunderstanding how this stuff works?
>
> Jose Alberto
>
>
>
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."