You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Robert <rv...@xs4all.nl> on 2005/05/04 16:09:21 UTC

IMarkupWriter newline/auto-indent

Hi,

Is there some way to let the IMarkupWriter insert newlines and auto-indent?
Because some of my HTML is all on one line now :)
Of course I could add them manually, but in theory the writer can be 
smart enough to do this for me.


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: IMarkupWriter newline/auto-indent

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 5, 2005, at 2:09 AM, Massimo Lusetti wrote:

> On 5/4/05, Patrick Casey <pa...@adelphia.net> wrote:
>
>
>>         You could do something similar to the DOM writers out  
>> there though
>> and offer a "prettyprint" flag (false by default) that adds  
>> inserts and
>> newlines to make the output more human readable. It'd be a useful  
>> flag for
>> debugging though not necessary (and slightly counterproductive) in
>> production.
>>
>
> Does Tapestry work with DOM to write and/or read html/xml ?

No.

     Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: IMarkupWriter newline/auto-indent

Posted by Massimo Lusetti <ml...@gmail.com>.
On 5/4/05, Patrick Casey <pa...@adelphia.net> wrote:

>         You could do something similar to the DOM writers out there though
> and offer a "prettyprint" flag (false by default) that adds inserts and
> newlines to make the output more human readable. It'd be a useful flag for
> debugging though not necessary (and slightly counterproductive) in
> production.

Does Tapestry work with DOM to write and/or read html/xml ?

Lurking on the list for a while without having the time to spend on
looking inside tapestry too much...

Thanks
-- 
Massimo

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: IMarkupWriter newline/auto-indent

Posted by Patrick Casey <pa...@adelphia.net>.
	You could do something similar to the DOM writers out there though
and offer a "prettyprint" flag (false by default) that adds inserts and
newlines to make the output more human readable. It'd be a useful flag for
debugging though not necessary (and slightly counterproductive) in
production.

	--- Pat

-----Original Message-----
From: Howard Lewis Ship [mailto:hlship@gmail.com] 
Sent: Wednesday, May 04, 2005 9:52 AM
To: Tapestry users
Subject: Re: IMarkupWriter newline/auto-indent

It doesn't really do that; a lot of HTML from templates shoots through 
unchanged. In fact, eliminating whitespace is of more practical use than 
generating more of it.

To understand where it is safe to add whitespace (i.e., not inside a <pre>) 
requires a bit more parsing and tracking of the HTML than Tapestry is 
designed to do; further, it also creates some additional issues for XML 
rendering.

On 5/4/05, Robert <rv...@xs4all.nl> wrote:
> 
> Hi,
> 
> Is there some way to let the IMarkupWriter insert newlines and 
> auto-indent?
> Because some of my HTML is all on one line now :)
> Of course I could add them manually, but in theory the writer can be
> smart enough to do this for me.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: IMarkupWriter newline/auto-indent

Posted by Howard Lewis Ship <hl...@gmail.com>.
It doesn't really do that; a lot of HTML from templates shoots through 
unchanged. In fact, eliminating whitespace is of more practical use than 
generating more of it.

To understand where it is safe to add whitespace (i.e., not inside a <pre>) 
requires a bit more parsing and tracking of the HTML than Tapestry is 
designed to do; further, it also creates some additional issues for XML 
rendering.

On 5/4/05, Robert <rv...@xs4all.nl> wrote:
> 
> Hi,
> 
> Is there some way to let the IMarkupWriter insert newlines and 
> auto-indent?
> Because some of my HTML is all on one line now :)
> Of course I could add them manually, but in theory the writer can be
> smart enough to do this for me.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com