IMO the client side looping and content creation becomes much more interesting when you consider throwing in an Ajax call and true content retrieval. Might be a case where it's beneficial to just output the base element to the client, have it decide on number of times to replicate and poll the server for content for each. This is a pretty common technique these days but it could be turned into a nifty little multi-purpose library.