A Data Model and Algebra for Querying XML Documents