count($max-node/ancestor::node()) -- http://www.dcarlisle.demon.co.uk/matthew XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list