We have developed a modified version of the W3C Parser, able to extract the XPath 3.0 queries used within XQuery files. See the public git repository.
We have released a benchmark of XPath queries extracted from the XSLT and XQuery files of several open-source projects. The initial release is xpath-benchmark-1.0.
(photo Colourful Books 2 ©Paul Hood, CC BY 2.0)