Actually, I doubt that; it's well integrated into the template parser,
not broken out into a separate service.  If only Tapestry were written
in Clojure :-)

On Fri, Jul 16, 2010 at 5:26 AM, Inge Solvoll <inge.tapes...@gmail.com> wrote:
> As always, I'm pretty sure it's possible and not too hard to decorate the
> built-in service that does this work :)
>
> On Fri, Jul 16, 2010 at 5:53 AM, Paul Stanton <p...@mapshed.com.au> wrote:
>
>> thanks for the suggestion howard, this would be fine if it were obvious to
>> all developers which cases were problematic. otherwise it's a case of
>> putting out spot fires which isn't good.
>>
>> i still think making the whitespace compressor more intelligent ie
>> replacing multiple whitespace chars with a single space is preferable. that
>> way we still get 99% of the benefits of compression yet none of the
>> drawbacks.
>>
>> is there a way to override the implementation of the class that does this?
>>
>> regards, paul.
>>
>>
>> Howard Lewis Ship wrote:
>>
>>> Where whitespace counts, add an xml:space="preserve" attribute to the
>>> enclosing tag, i.e.
>>>
>>> <p xml:space="preserve">This is my paragraph and sometimes a single
>>> word or phrase <span style="text-decoration:underline;">might need
>>> some special attention</span> <span style="font-weight:bold;">so I
>>> might do this</span>, but it's still <span
>>> style="font-style:italic;">my</span> paragraph.</p>
>>>
>>>
>>>
>>> On Wed, Jul 14, 2010 at 9:27 PM, Paul Stanton <p...@mapshed.com.au>
>>> wrote:
>>>
>>>
>>>> Firstly, I'd like to say that tapestry does most things very well and I
>>>> probably only comment on the things it doesn't do well. Thank you to
>>>> those
>>>> who've spent time improving the framework for making my job as a
>>>> developer
>>>> more enjoyable.
>>>>
>>>> I do have an issue with the production mode Considering the following in
>>>> your average TML:
>>>>
>>>> <p>This is my paragraph and sometimes a single word or phrase <span
>>>> style="text-decoration:underline;">might need some special
>>>> attention</span>
>>>> <span style="font-weight:bold;">so I might do this</span>, but it's still
>>>> <span style="font-style:italic;">my</span> paragraph.</p>
>>>>
>>>> or a shorter eg:
>>>> <p>A <span>B</span> <span>C</span> D</p>
>>>>
>>>> In development mode, this will render unchanged:
>>>>
>>>> A B C D
>>>>
>>>> However in production mode, tapestry will take out some important
>>>> whitespace:
>>>>
>>>> A BC D
>>>>
>>>> I know you can partially combat this by using a non-breaking space in the
>>>> markup (&nbsp;) however, this has the expected drawback of disallowing
>>>> line
>>>> breaking where it may be required.
>>>>
>>>> for example, a list of links:
>>>> <a href="url1">1</a>
>>>> <a href="url2">2</a>
>>>> <a href="url3">3</a>
>>>> <a href="url4">4</a>
>>>> <a href="url5">5</a>
>>>> ...
>>>>
>>>> becomes
>>>> <a href="url1">1</a><a href="url2">2</a><a href="url3">3</a><a
>>>> href="url4">4</a><a href="url5">5</a>...
>>>>
>>>> I agree that some 'compression' on html syntax is a good thing in a
>>>> production environment, but to keep the integrity of the document I think
>>>> tapestry should replace multiple whitespace characters with one
>>>> whitespace
>>>> character instead of removing all whitespace between tags. Therefore,
>>>> while
>>>> I know I can set "tapestry.compress-whitespace" to false, I would prefer
>>>> to
>>>> have my suggestion implemented in place of the existing mechanism or as
>>>> an
>>>> alternative.
>>>>
>>>> The main issues for me:
>>>> 1. Rendered markup is fundamentally different between production and
>>>> development environments, making the most commonly used form of testing
>>>> flawed
>>>> 2. In some cases a space is the only solution to layout problems and
>>>> tapestry won't allow it
>>>>
>>>> Keen to hear other opinions...
>>>>
>>>> p.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>
>>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to