ah, I see, it's using expath?
    
file:write($file asxs:string, $items asitem()*) asempty-sequence()file:write($file asxs:string, $items asitem()*, $params aselement(output:serialization-parameters)) asempty-sequence() something like that?
how is the return result from a query written to a file?
thanks,
Nick