XPath evaluation in linear time
Authors:
Open Access
- 20 July 2011
- journal article
- Published by Association for Computing Machinery (ACM) in Journal of the ACM
- Vol. 58 (4) , 1-33
Abstract
We consider a fragment of XPath 1.0, where attribute and text values may be compared. We show that for any unary query φ in this fragment, the set of nodes that satisfy the query in a document t can be calculated in time O (|φ| 3 | t |). We show that for a query in a bigger fragment with Kleene star allowed, the same can be done in time O (2 O (|φ|)|t|) or in time O (|φ| 3 |t|log|t|). Finally, we present algorithms for binary queries of XPath, which do a precomputation on the document and then output the selected pairs with constant delay.Keywords
This publication has 8 references indexed in Scilit:
- XPath evaluation in linear time with polynomial combined complexity2009
- XPath leashedACM Computing Surveys, 2009
- Factorization ForestsLecture Notes in Computer Science, 2009
- XPath evaluation in linear time2008
- Efficient algorithms for processing XPath queriesACM Transactions on Database Systems, 2005
- Automata theory for XML researchersACM SIGMOD Record, 2002
- Fast Algorithms for Finding Nearest Common AncestorsSIAM Journal on Computing, 1984
- Rapid identification of repeated patterns in strings, trees and arrays1972