How can I increment a counter, based on criteria, in my XSL
Posted on 2014-03-10
In Classic ASP, I am returning a result set from SQL Server, and using that to build a monthly calendar. Each calendar day is either blank (white space) or shows the name of the course that the instructor is giving. When I output the calendar to the screen (which is one month's worth of data, per instructor, in one long row showing the first day of the month through the last day of the month, I would like to display below the instructor's name (first column) a counter that shows the total number of days for that month that have a course associated with it. The most efficient place to do this is in the XSL when the calendar is being built, because it is already looping through the result set of the SQL query. As the XSL loops through each calendar day, for each instructor, I would like to increment a counter that will show how many courses he will be giving per month, then display that counter, and clear it out for the next instructor.