method

sort

ruby latest stable - Class: REXML::XPathParser

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

sort(array_of_nodes, order)
private

Reorders an array of nodes so that they are in document order It tries to do this efficiently.

FIXME: I need to get rid of this, but the issue is that most of the XPath interpreter functions as a filter, which means that we lose context going in and out of function calls. If I knew what the index of the nodes was, I wouldn’t have to do this. Maybe add a document IDX for each node? Problems with mutable documents. Or, rewrite everything.