You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sonny Sukumar <ah...@hotmail.com> on 2003/06/21 00:57:09 UTC

How to trim whitespace?

Hi guys,

Does anyone know how to trim out all unnecessary whitespace on HTML and XML 
docs coming out of Cocoon pipelines before sending them to the browser?  I'd 
like to save some bandwidth costs where I can. :-)

Thanks!

Sonny

_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: How to trim whitespace?

Posted by Luca Morandini <lu...@tin.it>.
Sonny Sukumar wrote:
> 
> Hi guys,
> 
> Does anyone know how to trim out all unnecessary whitespace on HTML and 
> XML docs coming out of Cocoon pipelines before sending them to the 
> browser?  I'd like to save some bandwidth costs where I can. :-)
> 
> Thanks!
> 
> Sonny
> 
> _________________________________________________________________
> Add photos to your messages with MSN 8. Get 2 months FREE*.  
> http://join.msn.com/?page=features/featuredemail


to get rid of indentation (blanks and whitespace at the beginning of 
lines) in your HTML, setup your html serialier with the "indent" element 
set to "no".

Anyway, if your want a real performance improvement, instruct your 
webserver to compress the response (both IIS and Apache have this 
capability, and most browsers support it).

Regards,

------------------------------------------
                Luca Morandini
                GIS Consultant
               lmorandini@ieee.org
http://space.virgilio.it/kumora/index.html
------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: How to trim whitespace?

Posted by Thang To <th...@luminas.co.uk>.
Hi Sonny,
Try the XSLT normalize-space() function in your stylesheets.

Hope this helps,
Thang


At 15:57 20/06/2003 -0700, you wrote:

>Hi guys,
>
>Does anyone know how to trim out all unnecessary whitespace on HTML and 
>XML docs coming out of Cocoon pipelines before sending them to the 
>browser?  I'd like to save some bandwidth costs where I can. :-)
>
>Thanks!
>
>Sonny
>
>_________________________________________________________________
>Add photos to your messages with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org