In the XQJ interface, calling bindObject applied to an instance of XMLGregorianCalendar that is not an instance of SaxonXMLGregorianCalendar throws an exception such as "invalid date". (For example, such an object is obtained by calling DatatypeFactory. newInstance().newXMLGregorianCalendar()). Saxon is mistakenly using the type name as the input to the conversion, rather than the string value of the date/time.
Note that in general, the Saxon implementation of XQJ only accepts objects of XQJ-defined interfaces if they use the Saxon implementation of those interfaces. Datatypes, however, are an exception to this general rule, and Saxon in principle should accept any implementation of the interfaces in the javax.xml.datatype package.
A patch is being placed in Subversion.