This article describes the implementation of the OAi-PMH protocol within the CERN Document Server (CDS). In terms of the protocol, CERN acts both as a data provider and service provider and the two core applications are described. The application of XML Schema and XSLT technology is emphasized.