XSLT and XPath Optimization

Michael Kay


This paper describes the main techniques used by the Saxon XSLT and XQuery processor to optimize the execution of XSLT stylesheets and XPath expressions, and reviews some additional XSLT and XPath optimization techniques that are not (yet) used in Saxon. The primary focus is on XPath rather than XSLT, partly because Saxon does relatively little optimization at the XSLT level (other than in the way pattern matching works). Recent releases of Saxon support XQuery 1.0 as well as XSLT 2.0. However, the XQuery processor is an in-memory processor, not a database query engine. Optimizing database queries is an entirely different art, because it relies so heavily on rearranging queries to exploit persistent indexes. An in-memory processor does not have this opportunity, because the only indexes available are those that are constructed transiently for the duration of a transformation or query. Saxon's processing can be divided into three phases: parsing, static analysis, and run-time execution. These are described in the three main sections of this paper.


Keywords: XPath 1.00.9; XSLT 1.00.9;


Bibliography Navigation: Reference List; Author Index; Title Index; Keyword Index

Generated by sharef2html on 2011-04-15, 02:00:41.