The <Order> elements can appear from 1 to 10 times. In the case where there is less than 10, I need to still generate an <TR> row with default values with the <TD>'s.
I currently have an <xsl:template match="Order"> which takes care of producing the rows for the existing <Order>'s. My problem is backfilling the remaining rows. I "think" I can use some sort of recursion, but I am not that familar with xsl or recursion, so I am at a loss.
Subject:Using XSL to Complete an HTML Table Author:Bob Rocco Date:15 May 2007 02:24 PM
James,
I plugged the code in and it works great.
One thing I noticed while stepping thru my code using the SS debugger, is that after the rows counter goes down to 0, the inner <xsl:call-template name="fillrows"> appears to be called repetitvely causing the rows counter to count back up to 10, then the "fillrows" exits completely. Is this normal behavior of a "recursive" call? Are the previously made calls simply being "unwound"?
Subject:Using XSL to Complete an HTML Table Author:James Durning Date:16 May 2007 11:08 AM Originally Posted: 16 May 2007 11:07 AM
Yes, each call to the function doesn't finish off until they get all the output from their calls, so the output is just returning to the calling function. Eg if you had 7 rows originally and needed to fill in the remaining 3, you'd notice it go from 3 -> 2 -> 1 -> 0, back to 1, back to 2, back to 3.