-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christophe Porteneuve wrote: > Marius Feraru a écrit : >> Ken Snyder wrote: >>>> And :empty seems tricky in XPath too. >> .//*[not(text())] should do the trick, but don't mind me, I'm already >> zzzzound asleep (:| > > It's good, if it *were* CSS3's definition of empty. CSS3 def of empty > requires no child element, nor non-empty child text nodes, the way I read > it. We don't even look at descendants.
My bad, you're absolutely right, I understand the same thing from CSS3 selector specs [1]: "The :empty pseudo-class represents an element that has no children at all, including possibly empty text nodes, from a DOM point of view." .oO( next time I'll refrain from talking while sleeping ;-) > So Ken's current implementation in JS is not quite right (as we must > ignore PI's, comments, and the like), and this XPath isn't, either. I'm > on it, though :-) It's fairly simple, both XPath and JS. Mmm, sounds interesting. I'm waiting for your XPath wizardry ;-) [1] http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#empty-pseudo - -- Marius Feraru -----BEGIN PGP SIGNATURE----- iD8DBQFF2m4qtZHp/AYZiNkRAiMHAJ9e3mE1LK/Ty/sTcbpUnhAKzcHh9wCg4XCU SYcuHKTrTYeqSVDXB1KI7Og= =jxUS -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---