Re: [htmltmpl] Whitespace (linefeed) suppression?
Brought to you by:
samtregar
From: Mark F. <mar...@ea...> - 2004-05-11 20:55:38
|
From: "petersm" <pe...@ve...> > Why should this matter (besides the bandwidth issue)? HTML ignores whitespace > and other than looking at the output of a template every now and then to make > sure that it is what you want, why do you care what the output looks like? Why take bandwidth off the table? I gave an example (of a table) where the whitespace could be significant. And, as has been mentioned, there are occasions when the unintended whitespace *does* affect the final rendering. In one prior discussion someone gave an example of the <image> element. Keith just gave an example concerning email. (It may not have come out on the list by the time you replied to me). The question of why I would care what H::T output looks like is subjective. Someone could suggest that I put all the H::T elements on one line and ask "why do you care what the template looks like?" Authoring is subjective. I just don't think I should get something out of H::T that I didn't intend. I don't think the tags should influence the resulting whitespace. The tags are eliminated, but whitespace associated with them is not. Is that really a "problem?" To me, it's just a subjective issue that I'd like the resulting HTML be closer to how I would author it if I hadn't used H::T tags. I'm getting something in the output that I didn't specify. > I like the fact that it does exactly what you tell it to do. If you have > whitespace it puts it in your loop. If you don't have whitespace it won't. > Fairly intuitive to me. Anyone? My argument is that I *can't* tell it what to do. :) The only solution is to remove the whitespace which will result in a very illegible template. Which takes me back to my comparison to HTML authoring and how legibility (without affecting the parser results) is provided for. I guess my argument is that it's not *only* a matter of being intuitive when/where to use whitespace. There are two kinds of whitespace. Maybe the only questions are 1. Is it it is valid to consider there are two types of whitespace. 2. Should the use of H::T tags result in whitespace you wouldn't have if you didn't use them? Thanks! Mark |