> There is probably a better way but I dont see the equivilent of "GetDocumentRoot()"

 Yes, it would often be handy as a helper method, but I'm following the XPath navigation semantics fairly directly: and remember that an Xdm document is in general well-balanced but not necessarily well-formed.
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay