Compile-Time XPath Evaluation for XML Identity Constraints

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional XML document validation using XPath expressions degrades performance due to the need for runtime evaluation, leading to inefficiencies in time and cost.

Innovation Solution

Evaluating XPath expressions at compile time to identify and mark schema nodes, allowing for enforcement of identity constraints without a full-fledged XPath processor at runtime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If XPath expressions are evaluated at runtime using an XPath processor, then identity constraints can be enforced, but system performance degrades significantly

Engineering Contradiction:
Improveidentity constraint enforcementVSAvoidXML processing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by evaluating XPath expressions during the compile-time phase rather than at runtime. The XML schema compiler pre-evaluates XPath expressions associated with identity constraints (unique, key, keyref) and generates optimized validation code. This shifts the computational burden from runtime to compile-time, enabling fast validation during XML document processing without requiring a full XPath processor during execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts the XPath evaluation functionality from the runtime validation process and relocates it to the compile-time schema compilation phase. By separating XPath expression evaluation from the runtime validation engine, the system eliminates the need for a complex XPath processor during XML document validation, retaining only the essential constraint enforcement logic.

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If a full-fledged XPath processor is used at runtime, then XPath expressions can be evaluated accurately, but system complexity and overhead increase

Engineering Contradiction:
ImproveXPath expression evaluation accuracyVSAvoidXPath processor overhead
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies partial action by implementing a simplified XPath evaluation mechanism that only handles the specific subset of XPath expressions required for identity constraint validation. Rather than implementing a complete XPath processor, the system evaluates only the necessary XPath expressions during compile-time schema compilation, generating optimized validation logic that requires minimal runtime processing.

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs XPath expression evaluation and schema node identification during the compile-time phase. The XML schema compiler pre-processes XPath expressions, identifies relevant schema nodes, and generates validation code that directly references pre-computed results. This preliminary action eliminates the need for complex runtime XPath processing while maintaining evaluation accuracy.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8055611B1Simplified XPath evaluation in XML document validation
Publication Date: 2011.11.08 SONOA NETWORKS INDIA PVT
  • US8055611B1 patent drawing
  • US8055611B1 patent drawing
  • US8055611B1 patent drawing

AI summary

Simplified XPath evaluation in Extensible Markup Language (XML) document validation. XML schema is compiled into a one dimensional array of schema nodes, where a schema node represents a complex/simple type definition in the XML scheme. Identity constraints are processed during compilation and Xpath expressions within these constraints are extracted and parsed. Further, these Xpath expressions are evaluated at compilation time to identify the schema nodes corresponding to the XML nodes referred in the identity constraints. The identity constraints are then enforced at runtime without the need to evaluate the Xpath expressions at the runtime.