The following query
select * from html where url="http://wait-till-i.com" and xpath='//a[@rel="tag"]'
produces the expected result (about 30 links). Try it:
http://query.yahooapis.com/v1/public/yql?q=select * from html where url="http://wait-till-i.com" and xpath='//a[@rel="tag"]' &format=xml
However, a similar query for other domains, for example
select * from html where url="http://userscripts.org/" and xpath='//a[@rel="nofollow"]'
throws an empty result set, which is not what I would expect. Try it:
http://query.yahooapis.com/v1/public/yql?q=select * from html where url="http://userscripts.org/" and xpath='//a[@rel="nofollow"]' &format=xml
I was experimenting with "select * from html" and different xpath expressions in several pages:
http://wiki.greasespot.net/Main_Pagehttp://www.greasespot.net/http://userscripts.org/users/2308http://userscripts.org/In all cases I got empty result sets, although a direct test of the xpath from javascript would always return the expected results.
Furthermore:
http://userscripts.org/* is valid xhtml
* is served as text/html;utf-8 and it is indeed
whereas
http://wait-till-i.com * is invalid html 4.01 Strict
* is also served as text/html;utf-8, but it contains non utf-8 characters.
Am I missing something obvious, or is this a bug?