It's not clear whether you actually found the documentation:
You can't use the -jar option because the default entry-point to saxon9.jar is the XSLT processor. You need something along the lines of
java -cp saxon9.jar -s:input.xml query.xq
qualifying each of the filenames with a path if necessary.
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference