indexing description: "Objects that ..." author: "" date: "$Date$" revision: "$Revision$" class AXIS_FOLLOWING inherit AXIS feature -- Basic Operations start (n: XML_NODE) is -- do node := n item := node create stack.make put_parents_on_stack (node) next end next is -- do if stack.is_empty then item := Void else item := item.next_sibling if item = Void then item := stack.item stack.remove next else put_children_on_stack (item) item := stack.item stack.remove end end end feature {NONE} -- Implementation stack: LINKED_STACK[XML_NODE] put_parents_on_stack (n: XML_NODE) is -- do if n /= n.owner_document then put_parents_on_stack (n.parent) stack.put (n.parent) end end put_children_on_stack (n: XML_NODE) is -- do stack.put (n) if n.first_child /= Void then put_children_on_stack (n.first_child) end end end