XSLT to XQuery Translation via Compile-Time Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing process of transforming XML data using XSLT stylesheets in relational database systems is inefficient due to the need for dynamic template matching and the construction of entire XML documents, which can be costly in terms of computational resources and performance.

Innovation Solution

The transformation of XSLT requests is optimized by processing them at compile-time into optimized XSLT stylesheets or equivalent XQuery expressions, leveraging structural descriptions of XML documents to reduce dynamic template matching and utilizing indexing mechanisms for efficient data extraction, thereby translating XSLT into XQuery for execution by a relational database query engine.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If dynamic template matching is used in XSLT transformation, then the transformation can handle diverse XML structures flexibly, but the computational cost and processing time increase significantly

Engineering Contradiction:
Improvetransformation flexibilityVSAvoidprocessing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent pre-compiles XSLT stylesheets into optimized form at compile-time, performing template matching and transformation logic preparation beforehand. This preliminary action stores the transformation rules in an optimized format that eliminates the need for runtime template matching, thus maintaining flexibility while dramatically reducing processing time during actual XML transformation operations

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent pre-compiles XSLT stylesheets into optimized form at compile-time, performing template matching and transformation logic preparation beforehand. This preliminary action stores the transformation rules in an optimized format that eliminates the need for runtime template matching, thus maintaining flexibility while dramatically reducing processing time during actual XML transformation operations

Inventive Principle:
Principle #10Preliminary action

2Reliability

If entire XML documents are constructed during transformation, then complete data processing is achieved, but computational resources and memory usage increase

Engineering Contradiction:
Improvedata processing completenessVSAvoidcomputational resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts and processes only the specific data elements needed for the transformation rather than constructing entire XML documents in memory. By using XQuery expressions to directly query and transform specific portions of XML data, the system maintains data processing completeness while significantly reducing memory consumption and computational resource usage

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the XML transformation process into targeted data extraction and transformation operations rather than loading and processing entire documents. This segmentation allows the system to work with discrete data portions, reducing memory overhead while maintaining the ability to process complete data sets through systematic querying and transformation

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If XSLT engine processing is used for XML transformation, then transformation functionality is provided, but query performance remains limited

Engineering Contradiction:
Improvetransformation capabilityVSAvoidquery performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent replaces the traditional XSLT engine processing mechanism with a database query optimization mechanism. By translating XSLT stylesheets into XQuery expressions that can be processed by database query optimizers, the system leverages established database optimization techniques including indexing, query rewriting, and execution plan optimization, thereby dramatically improving query performance while maintaining transformation capabilities

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent introduces XQuery expressions as an intermediary between the transformation logic and the XML data. This intermediary layer allows the transformation to be expressed in terms of efficient database queries that can leverage indexing and optimization, bridging the gap between flexible transformation requirements and high-performance query execution

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS7949941B2Optimizing XSLT based on input XML document structure description and translating XSLT into equivalent XQuery expressions
Publication Date: 2011.05.24 ORACLE INT CORP
  • US7949941B2 patent drawing
  • US7949941B2 patent drawing
  • US7949941B2 patent drawing

AI summary

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.