Optimizing XSLT based on input XML document structure description and translating XSLT into equivalent XQuery expressions
First Claim
1. A method comprising performing a machine-executed operation involving instructions, wherein the machine-executed operation is at least one of:
- A) sending the instructions over transmission media;
B) receiving the instructions over transmission media;
C) storing the instructions onto a machine-readable storage medium; and
D) executing the instructions;
wherein the instructions are instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of;
receiving a request to transform a set of one or more XML documents based on an XSLT stylesheet that includes calls to one or more transformation templates that each specifies how to transform one or more nodes in the set of one or more XML documents;
determining, based on nodes contained in the set of one or more XML documents, which particular one or more templates to use to transform the set of one or more XML documents; and
translating the XSLT stylesheet into a set of one or more XQuery language expressions, including converting calls to the particular one or more templates into calls to corresponding translated XQuery user-defined functions.
1 Assignment
0 Petitions
Accused Products
Abstract
Transformation of a set of XML documents via an XSLT stylesheet is made more efficient by rewriting the stylesheet at compile-time, based on the structural description of the set of XML documents, into an optimized stylesheet containing fewer dynamic template-matching calls than the original stylesheet. This rewritten stylesheet can be further rewritten into a set of XQuery expressions. At compile-time, the particular transformation templates that are appropriate for transforming the particular nodes contained in the set of XML documents are determined, and XSLT calls to the templates are converted to calls to corresponding XQuery user-defined functions. Determination of the appropriate transformation templates may be based on the structural description of the input set of XML documents, such as an XML Schema or Document Type Definition. The data from each template is translated into corresponding XQuery constructors, instructions from the template are translated into XQuery expressions, and the XQuery functions are inlined if possible.
128 Citations
31 Claims
-
1. A method comprising performing a machine-executed operation involving instructions, wherein the machine-executed operation is at least one of:
-
A) sending the instructions over transmission media;
B) receiving the instructions over transmission media;
C) storing the instructions onto a machine-readable storage medium; and
D) executing the instructions;
wherein the instructions are instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of;
receiving a request to transform a set of one or more XML documents based on an XSLT stylesheet that includes calls to one or more transformation templates that each specifies how to transform one or more nodes in the set of one or more XML documents;
determining, based on nodes contained in the set of one or more XML documents, which particular one or more templates to use to transform the set of one or more XML documents; and
translating the XSLT stylesheet into a set of one or more XQuery language expressions, including converting calls to the particular one or more templates into calls to corresponding translated XQuery user-defined functions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)
-
-
28. A method comprising performing a machine-executed operation involving instructions, wherein the machine-executed operation is at least one of:
-
A) sending the instructions over transmission media;
B) receiving the instructions over transmission media;
C) storing the instructions onto a machine-readable storage medium; and
D) executing the instructions;
wherein the instructions are instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of;
receiving a request to transform a set of one or more XML documents based on a first XSLT stylesheet that includes calls to transformation templates that each specifies how to transform one or more nodes in the set of one or more XML documents;
at request compile time, computing a rewritten XSLT stylesheet by rewriting the first XSLT stylesheet;
wherein computing the rewritten XSLT stylesheet includes determining, based at least in part on a structural description of the set of one or more XML documents, which particular one or more transformation templates to use to transform the set of one or more XML documents; and
wherein the rewritten XSLT stylesheet includes fewer dynamic template matching calls than the first XSLT stylesheet. - View Dependent Claims (29, 30, 31)
-
Specification