RE: [xsl] Transformation with respect to level of depth

Subject: RE: [xsl] Transformation with respect to level of depth
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 2 May 2007 18:15:10 +0100
> * How can I limit the parsing to a certain depth, say level 1,2,3 (0 for
root)? I guess, I have to maintain a variable "level" which is passed into
every template?


You can do that, or you can establish the depth of a node $n using
count($n/ancestor::*).

Michael Kay
http://www.saxonica.com/

Current Thread