I was able to achieve what I needed with nested <heading> within <lev> by using
<xsl:value-of select="count(ancestor::lev)"/>
Input:
------
<lev>
<heading>Level 1</heading>
<lev>
<heading>Level 2</heading>
<lev>
<heading>Level 3</heading>
</lev>
<heading>Level 2</heading>
</lev>
<heading>Level 1</heading>
</lev>
</lev>
Output:
-------
<pStyle:hd1>Level 1
<pStyle:hd1>Level 2
<pStyle:hd1>Level 3
<pStyle:hd1>Level 2
<pStyle:hd1>Level 1
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--