Instead of keeping track of an internal state in @stack and @context the various processing methods now take the context as an extra argument and return the nodes they produced. This makes it easier to recursively call certain methods, a requirement for processing XPath axes (e.g. the "ancestor" axis).