I have a XQuery expression stored in a file
(: file process.xq :) declare variable $var external; ...
and use it with Xidel.
xid