|
Posted by Eric B. Bednarz on 08/28/06 12:35
Michael Winter <m.winter@blueyonder.co.uk> writes:
> Eric B. Bednarz wrote:
>> Since whitespace between tags is often problematic
>
> Often?
Often enough (in practice, not even generally taking mixed content
models in account). I can say offhand that IE lte 6 has a problem with
list elements seperated by whitespace if they contain child elements
with the display property changed from inline to block, and I've seen
whitespace related problems regarding tables the other month in a dutch
newsgroup.
> 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).
If I wanted to write a library, yes. :->
If I know how the markup is generated, I don't see a real benefit in
the overhead of using a loop as an extra safety-net when I could address
a particular element directly. I would agree that this is quite
case-dependent, though.
[markup formatting a la <http://www.w3.org/2000/08/lb2/>]
> That's horrific, in my opinion.
Go shiver, it's not a new idea and even part of a standard
<http://www1.y12.doe.gov/capabilities/sgml/wg8/document/n1920/html/clause-A.4.5.html#clause-A.4.5.2>
and better don't ever use Jade then. :)
FWIW, I even find it very readable. Of course YMMD.
--
||| hexadecimal EBB
o-o decimal 3771
--oOo--( )--oOo-- octal 7273
205 goodbye binary 111010111011
[Back to original message]
|