How to get a counter inside xsl:for-each loop that would reflect the number of current element processed. For example my source XML is
You can also run conditional statements on the Postion() which can be really helpful in many scenarios.
for eg.
//Show header only once