XPath with Conditional Axis Relations
نویسنده
چکیده
This paper is about the W3C standard node-addressing language for XML documents, called XPath. XPath is still under development. Version 2.0 appeared in 2001 while the theoretical foundations of Version 1.0 (dating from 1998) are still being widely studied. The paper aims at bringing XPath to a “stable fixed point” in its development: a version which is expressively complete, still manageable computationally, with a user-friendly syntax and a natural semantics. We focus on an important axis relation which is not expressible in XPath 1.0 and is very useful in practice: the conditional axis. With it we can express paths specified by for instance “do a child step, while test is true at the resulting node”. We study the effect of adding conditional axis relations to XPath on its expressive power and the complexity of the query evaluation and query equivalence problems. We define an XPath dialect XCPath which is expressively complete, has a linear time query evaluation algorithm and for which query equivalence given a DTD can be decided in exponential time.
منابع مشابه
First Order Paths in Ordered Trees
We give two sufficient conditions on XPath like languages for having first order expressivity, meaning that every first order definable set of paths in an ordered node-labeled tree is definable in that XPath language. They are phrased in terms of expansions of navigational (sometimes called “Core”) XPath. Adding either complementation, or the more elegant conditional paths is sufficient. A cond...
متن کاملXPath: Looking Forward
The location path language XPath is of particular importance for XML applications since it is a core component of many XML processing standards such as XSLT or XQuery. In this paper, based on axis symmetry of XPath, equivalences of XPath 1.0 location paths involving reverse axes, such as ancestor and preceding, are established. These equivalences are used as rewriting rules in an algorithm for ...
متن کاملTaming XPath Queries by Minimizing Wildcard Steps
This paper presents a novel and complementary technique to optimize an XPath query by minimizing its wildcard steps. Our approach is based on using a general composite axis called the layer axis, to rewrite a sequence of XPath steps (all of which are wildcard steps except for possibly the last) into a single layer-axis step. We describe an efficient implementation of the layer axis and present ...
متن کاملValidity of Positive XPath Queries with Wildcard in the Presence of DTDs
This paper discusses the validity problem for positive XPath queries with wildcard in the presence of DTDs. A given XPath query p is valid under a DTD D if, for every XML document T conforming to D, the answer to p on T is nonempty. The validity problem is one of the basic static analyses of queries, together with the satisfiability and the containment problems. Although the validity problem is...
متن کامل