We convert the queries to use xpath, which works for html documents, but it doesn't work for xhtml. In case of xhtml we would need to provide a namespace resolver and elements would need to be prefixed with xhtml: I would be a lot easier to simply iterate the link elements and copare the text.
Created attachment 327971 [details]
Comment on attachment 327971 [details]
Oh well for trying to be clever!
Committed r225388: <https://trac.webkit.org/changeset/225388>