Flexible and dynamic environments are characterized by high independence from connection participants, low control over available services and high tolerance to communication failures. Integrating data sources published on such environments requires an integration strategy that guarantees local data sources autonomy. Multidatabase System (MDBS) has been consolidated as an approach to integrate multiple heterogeneous and distributed data sources. A key property of MDBSs is to guarantee a higher degree of local than the other approaches for integrating heterogeneous data sources. MDBS technology uses a query language as integration mechanism, which is responsible for solving integration conflicts. Thus, the query language must provide constructs to perform queries over several different data sources. Furthermore, it should be capable for solving integration conflicts. This paper proposes an extension to the XQuery language, called MXQuery. The key feature of the proposed language is to ...