2. A method of claim 1 wherein profiling with sample data comprises: transforming data a non-empty set of input files with data considered representative of actual data with hit-count profiling enabled in multiple passes; and summarizing the profile data of each of the multiple passes.
1. A method comprising: in a computer system comprising at least a processor and a memory, generating a XSL (Extensible Stylesheet Language) Transformations (XSLT) and Extensible Markup Language (XML) Path Language (XPath) execution tree for a source XSLT stylesheet; determining one or more optimizations for the XSLT and XPath execution tree, the determining one or more optimizations for the XSLT and XPath execution tree comprising profiling with sample data, identifying one or more hot-spot execution instruction nodes, and identifying one or more patterns for optimization for the one or more identified hot-spot execution instruction nodes, the identifying one or more hot-spot execution instruction nodes comprising, for each instruction in the execution tree, analyzing time and count values compared to threshold values, and selecting instructions for further analysis if predetermined conditions are fulfilled; applying the one or more optimizations to the XSLT and XPath execution tree; verifying the one or more optimizations in the XSLT and XPath execution tree; making the verified one or more optimizations persistent in an optimized source XSLT stylesheet; and transforming one or more source XML documents into one or more result documents using the optimized source XSLT stylesheet.