functx XQuery module
The popular "functx" XQuery module is built into xmlsh.
FunctX Module
To access this module you must import it but do not need to give a location hint ("at").
e.g.
import module namespace functx = 'http://www.functx.com' ;
For example, the xtype command is implemented in part with this script
xquery -n -q <{{ import module namespace functx = 'http://www.functx.com' ; declare variable $A external ; functx:sequence-type($A) }}> -v A {$var}