Hello,

Dario Liberman wrote:
Hello,

I am new to velocity, I am from the near webmacro world. :-)

I was thinking about migrating to Velocity.
And when I came to the VMs I found it interesting, but would like to
increment its expressive power now that I got tempted to use it.
The improvement goes subject to this question:
    I would like to have access inside a VM to the body node of the macro's
callee, is it possible?


I am new to this, and I would like to accomplish it if it is possible. Is there any guru that can help me out?

Any comments are welcome.

Here I describe what uses I would be giving to it, with examples, so that I
can explain myself.

for example:

code->
#macro( tostring $strvar )
    #set ( $strvar = "$macro_body")  ## this would do a kind of
Velocity.execute($current_context, new
stringwriter(req.get("$strvar")),macro_body_node)
#end
<-code

so when I use it:
code->
#tostring ( $mystrvar)
    VM code here, with any statements, directives, etc.
#end

The problem is macros can't have a body when being executed :( . It would be *really* nice if there were a way to do this. Right now, you would have to write a directive in order access the body.


-Bill


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



Reply via email to