1. A method comprising: 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 one or more 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; wherein the method is performed by one or more computing devices.
1. A method comprising: 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 one or more 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; wherein the method is performed by one or more computing devices. 14. The method of claim 1 , wherein translating the XSLT stylesheet into the set of one or more XQuery language expressions includes: translating an “xsl:call-template” instruction into an XQuery language expression that calls a corresponding XQuery user-defined function, wherein the corresponding XQuery user-defined function is based at least in part on the body of a corresponding template of the one or more templates.