Thanks for reporting it. Looks like a bug.

Michael Kay

On 06/08/2010 01:04, E Swift wrote:
Accessing the Parent property of an XdmNode object can throw an InvalidCastException when there is no parent.  Saxon somehow returns an XdmEmptySequence instead of null, which cannot be converted to XdmNode.  This forces anyone using this property to have a try catch block when they should only need a simple null check.  

System.InvalidCastException: Unable to cast object of type 'Saxon.Api.XdmEmptySequence' to type 'Saxon.Api.XdmNode'.   at Saxon.Api.XdmNode.get_Parent()
------------------------------------------------------------------------------ This email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge
_______________________________________________ saxon-help mailing list archived at