|
Posted by Michael Winter on 08/27/06 01:01
Eric B. Bednarz wrote:
[snip]
> Since whitespace between tags is often problematic
Often?
> (e.g. CSS bugs, DOM discrepancies),
If a script depends upon an exact, node-for-node representation of the
document tree, it's probably not very robust. There's certainly no need
to use whitespace nodes as an excuse for munging markup: use a loop to
traverse siblings in the document tree and test the node type (watch out
for IE5.x and comment nodes).
Even if markup is altered to remove whitespace between tags, there's no
need to reformat the entire document.
> the best way of formatting HTML is to remove [the whitespace]
That's horrific, in my opinion.
[snip]
Mike
[Back to original message]
|