includes every element in the document that precedes this node,
except for ancestors
# File lib/rexml/xpath_parser.rb, line 595
def preceding( node )
#puts "IN PRECEDING"
ancestors = []
p = node.parent
while p
ancestors << p
p = p.parent
end
acc = []
p = preceding_node_of( node )
#puts "P = #{p.inspect}"
while p
if ancestors.include? p
ancestors.delete(p)
else
acc << p
end
p = preceding_node_of( p )
#puts "P = #{p.inspect}"
end
acc
end