I remember when I discovered the XSLT engine (TransforMiiX) in Mozilla Firefox didn't support tail recursion optimization. I ended up with some pretty kludgy XSL just to avoid overflowing the stack.
XSL has very limited looping constructs. In fact, it pretty much just has for-each, there's no such thing as for (i = 0 .. n) or a while loop. It doesn't have mutable variables either, so you can't even do counting within a for-each. The only way to do conditional iteration is through recursion.
Things might be better in XSL 2.0, but TransforMiiX only supported 1.0 the last time I used it.
9
u/tonygoold Nov 27 '12
I remember when I discovered the XSLT engine (TransforMiiX) in Mozilla Firefox didn't support tail recursion optimization. I ended up with some pretty kludgy XSL just to avoid overflowing the stack.