Hi Guys,
I am new to XSLT, looking to solve a problem I am facing in filtering XML records.
I need to get both the Input XML record position and limit the output XML to a particular number (based on input provided to xsl:param from .net 1.1)
Input XML
<Parent>
<Child>AAA</Child>
<Child>ABA</Child>
<Child>DAA</Child>
<Child>DBAA</Child>
<Child>BZA</Child>
</Parent>
Output XML(Required)
<table>
<tr>
<td id="Row{Position of the record in Input XML}> node value </td>
</tr>
</table>
Eg: SearchParam='D' and Output Limit=1
if I am searching for one text starting with 'D', the output should be
<table>
<tr>
<td id="Row3>DAA</td>
</tr>
</table>
I am using XSLT:starts-with to get the records I need. But I am only able to limit the count or record position at any one point of time using the position() method.
Can anyone tell me how to achieve this,
Thanks,
Sarath