Thanks for reporting it. Looks like a bug.

Michael Kay
Saxonica

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 SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ saxon-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/saxon-help