[Home] [By Thread] [By Date] [Recent Entries]
At 01/01/16 14:00 -0800, David M. Goudreau wrote:
Does anyone know how to determine what "level" the current node is at in the XML using XSL? If I've understood your use of the word "level", the expression count(ancestors::node()) will give you "1" for the document element, "2" for children of the document element, etc. It also considers an element's attribute as one deeper than the element itself. Use count(ancestors::*) for a zero-origin count. I hope this helps. ................. Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



