Compiling XPath into a State-less Forward-only Subset

We show how the context state of XPath, accessed through the position() and last() pseudo-functions, can be eliminated in most cases by translating references to the context state with an equivalent contextfree expression, and how this enables the use of context state in combination with a subsequent forward-only transformation, allowing for execution of (almost) full XPath on any of the emerging streaming subsets. Specifically we show how the normalization into a core language as proposed in the current W3C Last Call draft of the XPath/XQuery Formal Semantics can be extended such that the context state and reverse axes can be eliminated from the core XPath (and potentially XQuery) language.

[1]  Dan Suciu,et al.  Stream processing of XPath queries with predicates , 2003, SIGMOD '03.

[2]  Marcus Fontoura,et al.  Streaming XPath processing with forward and backward axes , 2003, Proceedings 19th International Conference on Data Engineering (Cat. No.03CH37405).

[3]  Laks V. S. Lakshmanan,et al.  On Efficient Matching of Streaming XML Documents and Queries , 2002, EDBT.

[4]  Oliver Becker,et al.  Extended SAX filter processing with STX , 2003, Extreme Markup Languages®.

[5]  Tim Furche,et al.  XPath: Looking Forward , 2002, EDBT Workshops.

[6]  Dan Suciu,et al.  Optimizing regular path expressions using graph schemas , 1998, Proceedings 14th International Conference on Data Engineering.