1. A computer-implemented method comprising: receiving, by a processor, an XQuery query from a Java application via an XQuery API for Java (XQJ), the Java application attempting to access a relational data source having a relational data model; generating, by the processor, XML results responsive to the XQuery query and based on data from the relational data source by: dividing the XQuery query into one or more XQuery expressions; determining for the one or more XQuery expressions whether an XML data source or the relational data source is being queried, the one or more XQuery expressions including a first XQuery expression querying the relational data source; determining that the first XQuery expression cannot be translated into one or more relational queries for the relational data source and equivalent to the first XQuery expression; retrieving, by an XQuery engine having a first data model incompatible with the relational data model, the relational data from the relational data source; and executing, in the XQuery engine, the first XQuery expression using the retrieved relational data to generate, at least in part, the XML results responsive to the XQuery query and based on the relational data retrieved from the relational data source, the XML results responsive to the XQuery query and based on data from the relational data source generated without one or more relational queries equivalent to the first XQuery expression; and sending the XML results to the Java application via the XQJ.