Static optimization of XSLT stylesheets: template instantiation optimization and lazy XML parsing

The increasing popularity of XSLT brings up the requirement of more efficient performance. In this paper, we propose two optimization techniques based on template caller-callee analysis. One is the template instantiation optimization which analyzes a stylesheet and identifies the templates to be instantiated before transformation. The other is the static lazy XML parsing optimization that constructs a pruned XML tree by statically identifying the nodes that are actually referred. Furthermore, we have implemented both our optimizations on Saxon and have evaluated its performance. In these experiments, we have proved both of them to be practically useful and to improve XSLT performance.