: We propose specification of schema mappings and agents' actions in XML data integration task. We discuss the problem in a highly-dynamic environment consisting of a community of peer-to-peer cooperating partners (agents). Peers decide how to describe their local data, when to join and when to leave the system, how to communicate and share their information with partners. An agent responds to the query by asking its partners (friends), which are able to partly answer the query. All the answers are merged and final result is constructed. A peer propagates a query along semantic paths existing in the system. Semantic paths are determined by schema mappings defined between partners. We propose a method for specifying schema mappings and to translate them to XQuery expressions. Mappings are represented by means of logical formulas. We also propose a declarative specification of semantic-driven communication in the system. The specification is made in a peer-oriented extension of Prol...