Hmm, interesting. I guess that both approaches are based on the idea of
"levels", where
level 1 = nodes w/no dependencies
level 2 = nodes that depend on level 1 (only)
level 3 = nodes that depend on level 2 (and maybe also level 1)
level 4 = nodes that depend on level 3 (and maybe also levels 1 or 2)
With the solution I suggested I think you could get a stable sort by
specifying a secondary sort key on position().
Bill
Dimitre Novatchev wrote:
See also:
http://aspn.activestate.com/ASPN/Mail/Message/xsl-list/955081
and
http://aspn.activestate.com/ASPN/Mail/Message/xsl-list/956248
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list