You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/01/12 00:48:50 UTC
Re: Whitespace after key
Harish Krishnaswamy wrote:
> I would like to see whitespace trimmed, in fact I would also like to see
> new line characters trimmed like some other frameworks do. Especially
> when javascript is rendered, there is a lot of unnecessary new line
> feeds. Removing these would significatly reduce the size of the html to
> be streamed back, I think. May be there needs to be a switch to turn the
> trimming on and off.
Just saw this thread *after* I made my post re. exactly what you covered
here. The infamous line-breaks.
If its not available yet how would one go about removing them without
putting everything back to back in the template?
TIA
Fermin DCG
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Whitespace after key
Posted by "F. Da Costa" <da...@xs4all.nl>.
Harish Krishnaswamy wrote:
> There are a few things you can probably do AFAIK.
>
> 1. Write an Ant task that can read your templates and write out the
> stripped templates
Probably the cleanest way to do it.
Just go through the templates, look for some kind of marker indicating a
stripping requirement and placing the stripped file on its proper location
or post-processing the generated templates.
Hmm, add Ant to the to-do list and figure out how to add the task to the
automatic build process.
Should be fun :(.
Thx
Fermin
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Whitespace after key
Posted by "F. Da Costa" <da...@xs4all.nl>.
Howard M. Lewis Ship wrote:
> In some cases, where a component renders multiple HTML elements, I have often coded explicit new
> lines to help me when I debug the output HTML.
>
Fair enough, that sounds like something I would do as well.
Would this mean that these newlines are spread out throughout the code or
are they (conveniently) located in one place?
I guess what I'm asking is what it is that i'm looking for to turn these
explicit new-lines off.
Normally I wouldn't bother but since I have no chance in ... to get IE
changed into something like standardized (like Gecko) I had to pull some
rabbits out of my hat to get IE to play along.
However, that only works if I can output html wihout new-lines (has to do
with js not liking it).
I hope you can give me a few pointers here
TIA
Fermin DCG
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Whitespace after key
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
In some cases, where a component renders multiple HTML elements, I have often coded explicit new
lines to help me when I debug the output HTML.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry/
http://javatapestry.blogspot.com
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of F. Da Costa
> Sent: Monday, January 12, 2004 1:35 PM
> To: tapestry-user@jakarta.apache.org
> Subject: Re: Whitespace after key
>
>
> Harish Krishnaswamy wrote:
> > There are a few things you can probably do AFAIK.
> >
> > 1. Write an Ant task that can read your templates and write out the
> > stripped templates
> Did that (if anyone is interested in the ant file just let me
> know) but it
> does not get the job done.
> Tapestry still formats the code as seen by the browser.
> > 2. Write a TemplateSourceDelegate and do the stripping there may be
> > 3. Write a servlet filter
> >
> Assuming 2 or 3 is the way to go can this also be accomplished on a
> 'particular fle' basis (I mean that not every file needs the
> treatment so
> one would have to distinguish).
>
> Is there a partcular reason fo Tapestry to produce html output with
> delimiters? I always thought that linebreaks etc were not
> required in html
> (other then to make the code legible for us, humans).
>
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Whitespace after key
Posted by "F. Da Costa" <da...@xs4all.nl>.
Harish Krishnaswamy wrote:
> There are a few things you can probably do AFAIK.
>
> 1. Write an Ant task that can read your templates and write out the
> stripped templates
Did that (if anyone is interested in the ant file just let me know) but it
does not get the job done.
Tapestry still formats the code as seen by the browser.
> 2. Write a TemplateSourceDelegate and do the stripping there may be
> 3. Write a servlet filter
>
Assuming 2 or 3 is the way to go can this also be accomplished on a
'particular fle' basis (I mean that not every file needs the treatment so
one would have to distinguish).
Is there a partcular reason fo Tapestry to produce html output with
delimiters? I always thought that linebreaks etc were not required in html
(other then to make the code legible for us, humans).
Fermin DCG
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Whitespace after key
Posted by Harish Krishnaswamy <hk...@comcast.net>.
There are a few things you can probably do AFAIK.
1. Write an Ant task that can read your templates and write out the stripped templates
2. Write a TemplateSourceDelegate and do the stripping there may be
3. Write a servlet filter
-Harish
F. Da Costa wrote:
> Harish Krishnaswamy wrote:
>
>> I would like to see whitespace trimmed, in fact I would also like to
>> see new line characters trimmed like some other frameworks do.
>> Especially when javascript is rendered, there is a lot of unnecessary
>> new line feeds. Removing these would significatly reduce the size of
>> the html to be streamed back, I think. May be there needs to be a
>> switch to turn the trimming on and off.
>
> Just saw this thread *after* I made my post re. exactly what you covered
> here. The infamous line-breaks.
>
> If its not available yet how would one go about removing them without
> putting everything back to back in the template?
>
> TIA
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org