1. A method for processing an electronic document, comprising: performing, by a processor, a programmatic analysis to determine all required portions of an input document to produce an output document; generating, by the processor, an executable transformer to produce the output document from the input document; and producing, by the processor, the output document by transforming any streamable parts of the input document directly to corresponding parts of the output document without extraneous intermediate buffering.
5. The method of claim 1 , wherein performing the programmatic analysis comprises: analyzing accesses by a stylesheet to the input document to generate the executable transformer; and rewriting expressions of the stylesheet that address any required portions of the input document.