タイトルは必要以上に複雑です。これが問題のクエリです。
SELECT *
FROM query.multi
WHERE queries="
SELECT *
FROM html
WHERE url='http://www.stumbleupon.com/url/http://www.guildwars2.com'
AND xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span';
SELECT *
FROM xml
WHERE url='http://services.digg.com/1.0/endpoint?method=story.getAll&link=http://www.guildwars2.com';
SELECT *
FROM json
WHERE url='http://api.tweetmeme.com/url_info.json?url=http://www.guildwars2.com';
SELECT *
FROM xml
WHERE url='http://api.facebook.com/restserver.php?method=links.getStats&urls=http://www.guildwars2.com';
SELECT *
FROM json
WHERE url='http://www.reddit.com/button_info.json?url=http://www.guildwars2.com'"
具体的には、この行、
xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'
引用符があるため問題があります。3レベルの深さでネストする必要があり、使用する引用符の文字が不足しています。私は成功せずに次のバリエーションを試しました:
//no attribute quoting
xpath='//li[@class=listLi]/div[@class=views]/a/span'
//try to quote attribute w/ backslash & single quote
xpath='//li[@class=\'listLi\']/div[@class=\'views\']/a/span'
//try to quote attribute w/ backslash & double quote
xpath='//li[@class=\"listLi\"]/div[@class=\"views\"]/a/span'
//try to quote attribute with double single quotes, like SQL
xpath='//li[@class=''listLi'']/div[@class=''views'']/a/span'
//try to quote attribute with double double quotes, like SQL
xpath='//li[@class=""listLi""]/div[@class=""views""]/a/span'
//try to quote attribute with quote entities
xpath='//li[@class="listLi"]/div[@class="views"]/a/span'
//try to surround XPath with backslash & double quote
xpath=\"//li[@class='listLi']/div[@class='views']/a/span\"
//try to surround XPath with double double quote
xpath=""//li[@class='listLi']/div[@class='views']/a/span""
すべて成功せず。
XPath文字列のエスケープについてはあまりわかりませんが、私が見つけたものはすべて、concat('も"も使用できないため役に立たない)またはhtmlエンティティの使用のバリエーションのようです。属性に引用符を使用しないとエラーはスローされませんが、必要な実際のXPath文字列ではないため失敗します。
エスケープの処理方法に関するYQLドキュメントには何も表示されません。私はこれがいかにエッジケースであるかを知っていますが、彼らが何らかの脱出ガイドを持っていることを望んでいました。