Mapping between Java and XQuery data types is largely flexible, however the XQJ 1.0 specification does have default mapping rules mapping data types when they are not specified by the user.
The following table illustrates the default mapping rules for when binding Java values to external variables in XQuery expressions.