Modern applications (Web portals, digital libraries, etc.) require integrat
ed access to various information sources (from traditional DBMS to semistru
ctured Web repositories), fast deployment and low maintenance cost in a rap
idly evolving environment. Because of its flexibility, there is an increasi
ng interest in using XML as a middleware model for such applications. XML e
nables fast wrapping and declarative integration. However, query processing
in XML-based integration systems is still penalized by the lack of an alge
bra. with adequate optimization properties and the difficulty to understand
source query capabilities. In this paper, we propose an algebraic approach
to support efficient XML query evaluation. We define a general purpose alg
ebra suitable for semistructured or XML query languages. We show how this a
lgebra can be used, with appropriate type information, to also wrap more st
ructured query languages such as OQL or SQL. Finally, we develop new optimi
zation techniques for XML-based integration systems.