You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Pascual Queralt <pq...@yahoo.es> on 2005/11/04 18:55:45 UTC
whitespaces, why?
Hi to everyone.
Well, I am starting with Velocity and I have a problem with the whitespaces that appear when I call a Velocimacro.
My Velocimacro is the next.
#*
* Obtenemos el nombre de la relacion $number
* que se encuentra en en el conjunto de relations
*#
#macro(relation $lrelations $number)
#set($i = 0)
#foreach($rel in $lrelations)
#set($i = $i+1)
#if($number == $i)
$rel
#end
#end
#end
and the sentence that call this velocimacro is the next:
##########################################
ceq ModelGenHidden (#relation($relations 1) ; ? Set{ N, M } ? Model ? TargetMM ?
##########################################
but the result I get in the console is :
##########################################################
ceq ModelGenHidden ( Package2Schema
; ? Set{ N, M } ? Model ? TargetMM ? TracMM)
##########################################################
Does anybody know how I can prevent this white spaces??
Many thanks.
Pascual
---------------------------------
Correo Yahoo!
Comprueba qué es nuevo, aquí
http://correo.yahoo.es
Re: whitespaces, why?
Posted by Pascual Queralt <pq...@yahoo.es>.
Many thanks Mike.
Your solution looks like to work out well.
Mike Kienenberger <mk...@gmail.com> escribió:
Use ## for blank lines.
Use ## at the end of every non-blank line.
This will get rid of all newlines.
For example:
#macro(relation $lrelations $number)##
##
#set($i = 0)##
##
#foreach($rel in $lrelations)##
##
#set($i = $i+1)##
##
#if($number == $i)##
##
$rel##
##
#end## if
##
#end## foreach
##
#end## macro
On 11/4/05, Pascual Queralt
wrote:
> Hi to everyone.
>
> Well, I am starting with Velocity and I have a problem with the whitespaces that appear when I call a Velocimacro.
> My Velocimacro is the next.
>
> #*
>
> * Obtenemos el nombre de la relacion $number
>
> * que se encuentra en en el conjunto de relations
>
> *#
>
> #macro(relation $lrelations $number)
>
> #set($i = 0)
>
> #foreach($rel in $lrelations)
>
> #set($i = $i+1)
>
> #if($number == $i)
>
> $rel
>
> #end
>
> #end
>
> #end
>
>
>
> and the sentence that call this velocimacro is the next:
>
> ##########################################
>
> ceq ModelGenHidden (#relation($relations 1) ; ? Set{ N, M } ? Model ? TargetMM ?
>
> ##########################################
>
> but the result I get in the console is :
>
> ##########################################################
>
> ceq ModelGenHidden ( Package2Schema
>
> ; ? Set{ N, M } ? Model ? TargetMM ? TracMM)
>
>
>
> ##########################################################
>
>
>
> Does anybody know how I can prevent this white spaces??
>
> Many thanks.
>
>
>
> Pascual
>
>
>
>
>
>
>
> ---------------------------------
>
> Correo Yahoo!
> Comprueba qué es nuevo, aquí
> http://correo.yahoo.es
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
---------------------------------
Correo Yahoo!
Comprueba qué es nuevo, aquí
http://correo.yahoo.es
Re: whitespaces, why?
Posted by Mike Kienenberger <mk...@gmail.com>.
Use ## for blank lines.
Use ## at the end of every non-blank line.
This will get rid of all newlines.
For example:
#macro(relation $lrelations $number)##
##
#set($i = 0)##
##
#foreach($rel in $lrelations)##
##
#set($i = $i+1)##
##
#if($number == $i)##
##
$rel##
##
#end## if
##
#end## foreach
##
#end## macro
On 11/4/05, Pascual Queralt <pq...@yahoo.es> wrote:
> Hi to everyone.
>
> Well, I am starting with Velocity and I have a problem with the whitespaces that appear when I call a Velocimacro.
> My Velocimacro is the next.
>
> #*
>
> * Obtenemos el nombre de la relacion $number
>
> * que se encuentra en en el conjunto de relations
>
> *#
>
> #macro(relation $lrelations $number)
>
> #set($i = 0)
>
> #foreach($rel in $lrelations)
>
> #set($i = $i+1)
>
> #if($number == $i)
>
> $rel
>
> #end
>
> #end
>
> #end
>
>
>
> and the sentence that call this velocimacro is the next:
>
> ##########################################
>
> ceq ModelGenHidden (#relation($relations 1) ; ? Set{ N, M } ? Model ? TargetMM ?
>
> ##########################################
>
> but the result I get in the console is :
>
> ##########################################################
>
> ceq ModelGenHidden ( Package2Schema
>
> ; ? Set{ N, M } ? Model ? TargetMM ? TracMM)
>
>
>
> ##########################################################
>
>
>
> Does anybody know how I can prevent this white spaces??
>
> Many thanks.
>
>
>
> Pascual
>
>
>
>
>
>
>
> ---------------------------------
>
> Correo Yahoo!
> Comprueba qué es nuevo, aquí
> http://correo.yahoo.es
>
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org