32. A non-transitory computer-readable storage medium storing instructions, which, when executed by one or more computing devices, cause the one or more computing devices to perform: receiving a request to transform a set of one or more XML documents based at least in part on an XSLT stylesheet that includes calls to one or more transformation templates, wherein each transformation template specifies how to transform one or more nodes, wherein the one or more nodes include a first node and a descendant node of the first node, wherein the calls to the one or more transformation templates, if evaluated based on the XSLT stylesheet, would use an XSLT template matching process to associate the descendant node in the set of one or more XML documents with a transformation template; determining, based at least in part on a structural description that constrains the set of one or more XML documents to a hierarchy of nodes that may be present in the set of one or more XML documents, which transformation templates to use to transform the set of one or more XML documents, wherein the hierarchy of nodes includes the first node and the descendant node; and converting the calls in the XSLT stylesheet that would use the one or more transformation templates into calls to one or more XQuery user-defined functions, and including the calls to the one or more XQuery user-defined functions in a set of one or more XQuery language expressions; wherein the calls to the one or more XQuery user-defined functions do not use the XSLT template matching process.
32. A non-transitory computer-readable storage medium storing instructions, which, when executed by one or more computing devices, cause the one or more computing devices to perform: receiving a request to transform a set of one or more XML documents based at least in part on an XSLT stylesheet that includes calls to one or more transformation templates, wherein each transformation template specifies how to transform one or more nodes, wherein the one or more nodes include a first node and a descendant node of the first node, wherein the calls to the one or more transformation templates, if evaluated based on the XSLT stylesheet, would use an XSLT template matching process to associate the descendant node in the set of one or more XML documents with a transformation template; determining, based at least in part on a structural description that constrains the set of one or more XML documents to a hierarchy of nodes that may be present in the set of one or more XML documents, which transformation templates to use to transform the set of one or more XML documents, wherein the hierarchy of nodes includes the first node and the descendant node; and converting the calls in the XSLT stylesheet that would use the one or more transformation templates into calls to one or more XQuery user-defined functions, and including the calls to the one or more XQuery user-defined functions in a set of one or more XQuery language expressions; wherein the calls to the one or more XQuery user-defined functions do not use the XSLT template matching process. 44. The non-transitory computer-readable storage medium of claim 32 , wherein the determining further comprises: based at least in part on the structural description that constrains the set of one or more XML documents to the hierarchy of nodes that may be present in the set of one or more XML documents, constructing a corresponding sample document that represents the structure of the set of one or more XML documents; submitting the sample document to an XSLT engine for transformation based at least in part on the XSLT stylesheet and for tracing execution paths associated with the transformation, wherein the execution paths indicate, for particular nodes contained in the sample document, which particular transformation template to use to transform the corresponding particular node.