We show how to specify and use the metadata for a virtual and relational data integration system under the local-as-view (LAV) approach. We use XML and RuleML for representing metadata, like the global and local schemas, the mappings between the former and the latter, and global integrity constraints. XQuery is used to retrieve relevant information for query planning. The system uses an extended inverse rules algorithm for computing certain answers that is provably correct for monotone relational global queries. For query answering, evaluation engines for answer set programs on relational databases are used. The programs declaratively specify the legal instances of the integration system.