Hi,

I can't seem to figure out how to bind an external variable as a document. I've searched all of the docs and am at a bit of loss. Is the following possible? possible?

I've tried the following: http://pastebin.com/sbekQZNP

With the following XQuery: http://pastebin.com/W8ZcMxJ9

But it always results in  the error 'Invalid cast from xs:untypedAtomic to document-node()' - how does one tell it to be an document-node and not an xs:untypedAtomic. I've also tried setting it to doc('path/to/xml') with no luck

Thanks,
Dustin