A method of performing XSLT processing is disclosed. The method involves defining a binary tree, each node representing either an XML document or XSLT stylesheet, each leaf representing a an existing file, and each non-leaf node having two child nodes, one representing an XML document, and one representing an XSLT stylesheet, performing a post-order traversal of the binary tree, each non-leaf node being constructed by transforming the non-leaf node's respective XML document child node using the non-leaf node's respective XSLT stylesheet to create the non-leaf node, and creating a final text document as the root node.