Thanks a lot.
Below code is working fine.
Code:
<xsl:for-each select="//School/SchoolDetails[position() < 6]">
But in my post
Code:
<xsl:value-of select="//School/SchoolDetails/@SchoolName"/>
is pringting the 1st record for five times. But Martin Honnen
suggested that below code will print the first five records rather than printing the 1st record for 5 times.
Code:
<xsl:value-of select="@SchoolName"/>
Now i have a small problem. If the XML file is more than five records then it is fine. If the XML is having less than 5 records than i have to insert some blank values.
How i will handle that.