Hi,
Hope someone can assist me as I'm stuck at the moment.

I have this XML (shortcut/edited version):
<!-- Line -->
<buttonNumber>1</buttonNumber>
<buttonTypeId>1</buttonTypeId>
<speedDialDisplay/>
<speedDialNumber/>
<sipProxy>proxy.com.au</sipProxy>
<endpoint>
<phoneNumber>09900001</phoneNumber>
<buttonDisplayName>09900001</buttonDisplayName>
<callerDisplayName>09900001</callerDisplayName>
</endpoint>
</builtInButtons>

<!-- Monitor -->
<buttonNumber>2</buttonNumber>
<buttonTypeId>2</buttonTypeId>
<speedDialDisplay/>
<speedDialNumber/>
<sipProxy>proxy.com.au</sipProxy>
<endpoint>
<phoneNumber>09900000</phoneNumber>
<buttonDisplayName>09900000</buttonDisplayName>
<callerDisplayName>09900000</callerDisplayName>
</endpoint>

<!-- Speed Dial -->
<buttonNumber>3</buttonNumber>
<buttonTypeId>3</buttonTypeId>
<speedDialDisplay>Speed Dial Name</speedDialDisplay>
<speedDialNumber>12345678</speedDialNumber>
<sipProxy>proxy.com.au</sipProxy>

<!-- Empty -->
<buttonNumber>4</buttonNumber>
<buttonTypeId>2</buttonTypeId>
<speedDialDisplay/>
<speedDialNumber/>
<sipProxy>proxy.com.au</sipProxy>
</buttons>

The values I'm after are to meet this conditions:
- buttonTypeId either 2 or 3, and speedDialNumber or phoneNumber are not Empty

So using this XSL, I AM ABLE TO GET THE VALUES I'M AFTER
<xsl:for-each select="builtInButtons">
<xsl:if test="buttonTypeId = '2' or buttonTypeId = '3'">
<xsl:if test="endpoint/phoneNumber != '' or speedDialNumber != ''">

The issue i have is DISPLAYING THEM, AS THE OUTPUT NEEDS TO BE INCREMENTAL:
e.g
if there are 2 items, satisfies the conditions, output as:
item.1=<value>
item.2=<value>

if there are 3 items,
item.1=<value>
item.2=<value>
item.3=<value>

I'm able to get the values im after, but displaying it is the problem. using counters, would have fixed the issue easy, however i found the hard way that XSL doesnt do counters.
there should be other way of approaching this, please help ?
Thanks for your help.