Harry:NotaBene 3.1 included basic outlining features (I can't remember now if it worked as expected). Maybe it could be inspiring for you (and the implemented XPL code useful)... Manuel Castelao
Harry:
Manuel Castelao