The diversity and availability of information sources on the World Wide Web has set the stage for integration and reuse at an unparalleled scale. There remain obstacles to exploiting the extent of the Web's resources in a consistent, scalable and maintainable fashion. The autonomy and volatility of Web sources complicates maintaining wrappers consistent with the requirements of the data's target application. Also, the sources' semantic heterogeneity requires practical methods to mediate their contents. This paper presents an algebra for semistructured data. This algebra is the tool we use to develop wrappers, and mediate their semantic content. We describe wrapper refinement and maintenance as the process of developing a congruity measure between source data sets and their target application. This measure expresses explicitly the context within which source data is relevant for its target use. Enabling mediation between wrappers corresponds to establishing an articulation between data sources through a similarity measure. Similarity measures encapsulate conditions under which sources may be used together.