In this article we propose algorithms for implementing the axes for element nodes in XPath given a DOM-like representation of the document. Each algorithm assumes an input list that is sorted in document order and duplicate-free and returns a sorted and duplicate-free list of the result of following a certain axis from the nodes in the input list. The time complexity of all presented algorithms is at most O(l +m) where l is the size of the input list andm the size of the output list. This improves upon results in [4] where also algorithms with linear time complexity are presented, but these are linear in the size of the entire document whereas our algorithms are linear in the size of the intermediate results which are often much smaller.
[1]
Georg Gottlob,et al.
Efficient Algorithms for Processing XPath Queries
,
2002,
VLDB.
[2]
Torsten Grust,et al.
Staircase Join: Teach a Relational DBMS to Watch its (Axis) Steps
,
2003,
VLDB.
[3]
Torsten. Grust,et al.
Accelerating XPath location steps
,
2002,
SIGMOD '02.
[4]
Luc Segoufin,et al.
Typing and querying XML documents: some complexity bounds
,
2003,
PODS.
[5]
Georg Gottlob,et al.
The complexity of XPath query evaluation
,
2003,
PODS.
[6]
Jan Hidders,et al.
Avoiding Unnecessary Ordering Operations in XPath
,
2003,
DBPL.