I have an XSLT-script which generates a sub menu recursively. The structure of the HTML generated is basically an unordered list:
Code:
<ul>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Item 2.1</li>
<li>Item 2.2</li>
</ul>
</li>
<li>Item 3</li>
I'm doing some graphic stuff which involves rounded corners and therefore I need to insert code before the closing </li> tag in the nested unordered list. Like this:
Code:
<ul>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Item 2.1</li>
<li>Item 2.2
<I WANT TO INSERT CODE HERE>
</li>
</ul>
</li>
<li>Item 3</li>
This should only be done at a certain level in the structure Does anyone have an example of how to do this?
Is it for example possible to check if the current node is the last node at the current level? If I could do that check, perhaps I could inject the code snippet before the closing tag?
Thanks in advance!
Web Developer at Kärnhuset -
http://www.karnhuset.net - Stockholm, Sweden