Issue:I need to produce a script that will go through a list and create a attribute "AppliedParagraphStyle" with a value of the level that it's currently at. While in the recursion, we start off at level1, then we have a sub list, so we are now in level 2, etc.However, my script for some reason goes to deep and outputs all of the levels as level 1.I need to produce the following XML:\[code\]<ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/ul"> <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Character Style 1"> <Content>abc</Content> <Br/> <Content>xyz</Content> <Br/> <Content>abc</Content> <Br/> <Content>xyzabc</Content> <Br/> </CharacterStyleRange> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/ol level 1"> <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Character Style 1"> <Content>xyz</Content> <Br/> </CharacterStyleRange> </ParagraphStyleRange> <ParagraphStyleRange AppliedParagraphStyle="ParagraphStyle/ol level 2"> <CharacterStyleRange AppliedCharacterStyle="CharacterStyle/Character Style 1"> <Content>abc</Content> <Br/> </CharacterStyleRange> </ParagraphStyleRange>\[/code\]I have XHTML (input snippet) that looks like this:\[code\]<ol><li>level1a</li><li>level1b<ol><li>level2a</li><li>level2b</li><li>level2c</li></ol></li></ol>\[/code\]This is a snippet of XSLT to transverse the XHTML:\[code\] <xsl:template match="xhtmll/xhtml:li[not(*)]"> <xsl:call-template name="para-style-range"> <xsl:with-param name="style-name">article%3aol Level 1</xsl:with-param> </xsl:call-template> <xsl:if test ="xhtmll/xhtml:li[*]| xhtml:ul/xhtml:li[*]"> <xsl:apply-templates select="xhtmll/xhtml:li[*]| xhtml:ul/xhtml:li[*]" /> </xsl:if> </xsl:template>\[/code\]Any hints on what the XSLT should look like? I need to figure out how to detect how far I go into the list, so in my case I want to dig only 3 nodes down.Thank you.