Go home now Header Background Image
Submission Procedure
share: |
Follow us
Volume 16 / Issue 5

available in:   PDF (170 kB) PS (199 kB)
Similar Docs BibTeX   Write a comment
Links into Future
DOI:   10.3217/jucs-016-05-0833


Evaluating Linear XPath Expressions by Pattern-Matching Automata

Panu Silvasti (Helsinki University of Technology, Finland)

Seppo Sippu (University of Helsinki, Finland)

Eljas Soisalon-Soininen (Helsinki University of Technology, Finland)

Abstract: We consider the problem of efficiently evaluating a large number of XPath expressions, especially in the case when they define subscriber profiles for filtering of XML documents. For each document in an XML document stream, the task is to determine those profiles that match the document. In this article we present a new general method for filtering with profiles expressed by linear XPath expressions with child operators (/), descendant operators (//), and wildcards (*). This new filtering algorithm is based on a backtracking deterministic finite automaton derived from the classic Aho-Corasick pattern-matching automaton. This automaton has a size linear in the sum of the sizes of the XPath filters, and the worst-case time bound of the algorithm is much less than the time bound of the simulation of linear-size nondeterministic automata.

Our new algorithm has a predecessor that can handle child and descendant operators but not wildcards, and has been shown to be extremely efficient when a documenttype definition (DTD) has been used to prune out all the wildcards and most of the descendant operators. But in some cases, such as when the DTD is highly recursive, it may not be possible to prune out all wildcards without producing a too large set of filters. Then it is important to have the full generality of an evaluation algorithm, as presented in this article, that can also handle wildcards.

Keywords: filtering of streams of XML documents, linear XPath expressions

Categories: H.3.3