W3C home > Mailing lists > Public > public-webapi@w3.org > May 2007

Re: Comments on element traversal specification...

From: liorean <liorean@gmail.com>
Date: Wed, 23 May 2007 03:56:05 +0200
Message-ID: <cee13aa30705221856gb19bc8bu7f8e0819c5ed80ba@mail.gmail.com>
To: public-webapi@w3.org

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:23 UTC