We propose a new implementation scheme for XML transformation languages through derivation of stream processors. Most of XML transformation languages are implemented as tree manipulation, where input XML trees are completely stored in memory. It leads to inefficient memory usage in particular when we apply a facile transformation to large-sized inputs. In contrast, XML stream processing can minimize memory usage and execution time since it begins to output the transformation result before reading the whole input. However, it is much harder to program XML stream processors than to specify tree manipulations because stream processing frequently requires 'stateful programming'. This paper proposes an implementation scheme for XML transformation languages, in which we can define an XML transformation as tree manipulation and also we can obtain an XML stream processor automatically. The implementation scheme employs a framework of a composition of attribute grammars.