I guess I could make some XSL stylesheet, then use it as a template with parameter option to evaluate XPath expression with Saxon XSLT processor on command line, like:
Another option is to use XPath within a tool, such as oXygen. Its XPath Builder View is a very handy interface for building and testing XPath expressions. There is a Linux version of the tool, and it has built-in support for Saxon and other processors (Xerces, LIBXML, XSV, MSXML4.0, MSXML .NET and SQC.).