Re: Comments on element traversal specification...

On 23/05/07, Ray Whitmer <ray@jhax.net> wrote:
> My main comment: I could not use unless it does not do something
> reasonable with skipped intervening content, which it could do with
> little disruption.

Why not just ignore it? It's very useful to be able to traverse the
element tree without taking text nodes into account at all. Just look
at CSS, it is purely concerned with element nodes (and
pseudo-elements). We already have
nextSibling/previousSibling/firstChild/lastChild/parentNode for the
case of being interested in other types of nodes.

> For my purposes, if the application is processing element content, it
> needs to raise an error if non-whitespace text is found.  If it is
> processing mixed content, it needs to pass the skipped content back to
> the caller. I cannot think of the case where non-whitespace text
> should ever be silently ignored.

I can see many uses. Script tree transformations, overlays, most
client side manipulation, if you want to write your own Selectors API
for kicks, there are many cases where you are only interested in the
elements tree.
-- 
David "liorean" Andersson

Received on Wednesday, 23 May 2007 01:56:08 UTC