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 ( ) 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