You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/01/17 21:30:03 UTC

Re: [Tapestry-developer] Template parser eating newlines; any way to avoid this?

It does eat the newlines, actually, it eats up whitespace around dynamic
tags.  Otherwise, you see a LOT of whitespace in the output HTML.

One option is to use a templating engine such as Velocity to generate this
output.  That'll give you more precise control.

Of course, there are advantages to only using a single metaphor, so I can
see why you'd want a Tapestry page to do this.

All I can offer is for you to add a feature request to make this
controllable, and we'll see what we can do.

Malcom's suggestion, that you emit a rich HTML page where whitespace isn't
an issue, also has great merits.

Howard


----- Original Message -----
From: <o....@considion.com>
To: "Malcolm Edgar" <ma...@tpg.com.au>
Cc: <ta...@lists.sourceforge.net>
Sent: Friday, January 17, 2003 9:24 AM
Subject: Re: [Tapestry-developer] Template parser eating newlines; any way
to avoid this?


> The rendering is fine if you want to
> render HTML-pages. But i want to render a plain text
> template which i can use to generate email bodies.
> In such a case i cannot add tags to force line breaks
> or whitespace.
>
> I know that tapestry is not intended to render plain text
> templates, but i thought it would be nice if i could
> use it for that.
>
> Regards,
>
> Oliver
>
>
> > Hi Oliver,
> >
> > my understanding of HTML is that a newline character is treaded like a
> > space and
> > additional white space is not significant, so your code should render
as:
> >
> > John Smith john.smith@foo.bar
> >
> > If I need additional whitespace I tend to use: &nbsp; and <br/> for line
> > breaks.
> >
> > regards Malcolm
> >
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will
> allow you to extend the highest allowed 128 bit encryption to all your
> clients even if they use browsers that are limited to 40 bit encryption.
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en
> _______________________________________________
> Tapestry-developer mailing list
> Tapestry-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>