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:29:31 UTC

Stripping whitespace from html output

Hi all,

Following is a snip of code i'm experimenting with:
...
skeleton.push('<tr jwcid="branchDetails">
  <td>
   <div jwcid="tiers">
    <span jwcid="@contrib:Choose">
     <span jwcid="@contrib:When" condition="ognl:branch">
      <span jwcid="@DirectLink" parameters="ognl:'lbody'+branchNode.id"> 	 
      <span class="alt">[-] /</span>
      </span>
     </span>
     <span jwcid="@contrib:Otherwise">
       <a>[-] /</span></a>
      </span>
     </span>
     <a href="#" title="Row title">
      <span jwcid="@Insert" value="ognl:branchNode.id">TD B2</span>
     </a>
     <input title="Hide / Unhide rows" type="checkbox"/>
   </div>
  </td>
</tr>');
...

It might not be correctly tagged but that is not the issue (and Thunderbird 
does not have a Spindle editor integrated, Geoff? ;)).

My question concerns the fact that the string being produced has got line 
breaks in there and that does not go down well once the page arrives at the 
browser. Obviously this issue is alleviated when I put all the tags back to 
back but that makes the code slightly less legible (to put it mildly).

The question:
  Is there a way to competely minimize the html code and just take out all 
  formatting (read line breaks) characters?

TIA,
Fermin DCG


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