CSS :not(:empty) not working

39 views
Skip to first unread message

Francisco José Aquino García

unread,
Jun 4, 2012, 12:56:25 PM6/4/12
to joox...@googlegroups.com
I'm using jOOX to traverse XML returned by various web services. Love it's jQuery-like API (that's why I'm trying it)
But I'm finding trouble trying to use a selector expression like:

    E > E:not(:empty)

But with no success. has() returns an empty Match, find() throws an Exception:
java.lang.RuntimeException: javax.xml.xpath.XPathExpressionException
    at org.joox.Impl.xpath(Impl.java:494)
    at org.joox.Impl.xpath(Impl.java:467)
    at org.joox.Impl.find(Impl.java:419)
    at org.joox.Impl.find(Impl.java:93)

After a little digging into the javadocs, I've come accross the documentation for JOOX.selector() and found that :not() isn't there (:not(pun intended))


Thanks

Lukas Eder

unread,
Jun 7, 2012, 6:07:13 PM6/7/12
to joox...@googlegroups.com
Hello,

Thanks for reporting this. Indeed, CSS selector support is somewhat
experimental, so far in jOOX. Only find() should implement them, I'm
not sure about has(). I'll have to double-check, though.

I'll look into your XPath exception, soon.

Cheers
Lukas

PS: I'm currently on vacation, so fixes might take a bit longer.
Thanks for your understanding.

2012/6/4 Francisco José Aquino García <fj.a...@gmail.com>:

Lukas Eder

unread,
Jul 7, 2012, 2:52:27 PM7/7/12
to joox...@googlegroups.com, fj.a...@gmail.com
Hello,

Finally I have some time for jOOX. I will be tracking your reported issue here:
http://code.google.com/p/joox/issues/detail?id=113

I suspect this is a bug in the third party library jOOX is using for
CSS selectors:
https://github.com/chrsan/css-selectors/issues/1

I'll keep you posted
Cheers
Lukas

2012/6/8 Lukas Eder <lukas...@gmail.com>:

Lukas Eder

unread,
Jul 7, 2012, 3:01:36 PM7/7/12
to joox...@googlegroups.com
On a second look, it becomes clear that this has not yet been implemented... ;-)

Cheers
Lukas

2012/7/7 Lukas Eder <lukas...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages