You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Dave Fox <df...@NETdelivery.com> on 2002/07/24 02:34:02 UTC

whitespace trouble

I'm currently using Ant1.4/Velocity 1.3 on Win2K. According to the
documentation (http://jakarta.apache.org/velocity/user-guide.html)
Velocity's output should not be affected by the formatting of VTL code.  The
problem I'm seeing is that both Tabs and whitespace that precede directives
are being passed to the output. For example if I indent some code:

#foreach($foo in $bar)
	#if ($foo.equals("true"))
		#doSomething($foo)
	#end
#end

...I get progressively more indentation in my output depending on how many
times the foreach loop is processed.

Thank you for your attention to this matter.
Dave Fox 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: whitespace trouble

Posted by Ch...@dlr.de.
It's still the standalone-directive-whitespace problem addressed in
several other threads. Was there a consensus reached if this could
be handled properly?

Geir Magnusson Jr. wrote:
> On 7/23/02 8:34 PM, "Dave Fox" <df...@NETdelivery.com> wrote:
> 
> 
>>I'm currently using Ant1.4/Velocity 1.3 on Win2K. According to the
>>documentation (http://jakarta.apache.org/velocity/user-guide.html)
>>Velocity's output should not be affected by the formatting of VTL code.  The
>>problem I'm seeing is that both Tabs and whitespace that precede directives
>>are being passed to the output. For example if I indent some code:
>>
>>#foreach($foo in $bar)
>>#if ($foo.equals("true"))
>>#doSomething($foo)
>>#end
>>#end
> 
> 
> Yes, The output is indeed affected by whitespace.
> 
> It's a templating system, so the specific whitespace in the template is
> output.
> 
> 
>>...I get progressively more indentation in my output depending on how many
>>times the foreach loop is processed.
>>
>>Thank you for your attention to this matter.
>>Dave Fox 
> 


-- 
:) Christoph Reck


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: whitespace trouble

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 7/23/02 8:34 PM, "Dave Fox" <df...@NETdelivery.com> wrote:

> I'm currently using Ant1.4/Velocity 1.3 on Win2K. According to the
> documentation (http://jakarta.apache.org/velocity/user-guide.html)
> Velocity's output should not be affected by the formatting of VTL code.  The
> problem I'm seeing is that both Tabs and whitespace that precede directives
> are being passed to the output. For example if I indent some code:
> 
> #foreach($foo in $bar)
> #if ($foo.equals("true"))
> #doSomething($foo)
> #end
> #end

Yes, The output is indeed affected by whitespace.

It's a templating system, so the specific whitespace in the template is
output.

> 
> ...I get progressively more indentation in my output depending on how many
> times the foreach loop is processed.
> 
> Thank you for your attention to this matter.
> Dave Fox 
-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>