1. A method for performing focus inference when compiling an Extensible Markup Language Transforms (XSLT) stylesheet into a compiled XSLT processor, comprising: generating an Abstract Syntax Tree (AST) from said XSLT stylesheet; annotating nodes in said AST that are associated with variables and parameters, wherein said annotating comprises associating said nodes with focus inference flags, wherein said focus inference flags record a status of a corresponding AST node; building a reverse call graph for a template associated with the XSLT stylesheet; propagating any focus inference flags from a callee template to a caller template; propagating any focus inference flags through the reverse call graph.