Planned XQuery Support

Overview

XQuery 1.0 is a direct superset of the XPath 2.0 language, so the current plan is to work directly on supporting XQuery and then possibly extracting a subset of that code to only support XPath 2.0 operations. Support for the XQuery Update Facility is also planned

Implementation Philosophy

The current thinking is to implement XQuery in the following stages:

  • An XQuery parser will compile XQuery expressions into a tree of command structures which may then be cached or serialized.
  • A compiled XQuery expression will then be run on an XQuery virtual machine.

XQuery Virtual Machine

The XQuery virtual machine will be designed to operate on an iterator such as the IForwardNodeIterator currently specified in Sendero. This way XQuery operations can be performed on any data structure that conforms to the iterator such as XML Nodes in memory or an XML Database on disk. The iterator should be extended so that it supports the update operations specified by the XQuery Update Facility.