A method in one embodiment includes receiving an XSLT transformation;
analyzing the transformation for determining which information about the
input is required to generate code that is streaming with respect to the
rest of the input; calculating an algorithm which when given the required
input information will then execute the entire XSLT transform in a
streaming fashion; and generating code for computing the information
about the input that is required for the calculated streaming algorithm
while simultaneously buffering all incoming input data; storing the
generated code; receiving incoming input data; running the generated code
for computing the information that is required for the calculated
streaming algorithm while simultaneously buffering incoming data; and
once the required information has been computed: replaying the buffered
data through the calculated streaming algorithm in a streaming manner;
and finishing any remaining input through the calculated streaming
version of the input algorithm in a streaming manner.