I have ended up with a set of templates. One for an XML page, one for a paragraph and one for the productList.
Google accepts only 1000 records per image sitemap. Therefore the default view of the response is a sitemap index that had a list of pages for individual image sitemaps. Once a pagenum parameter is found in the url, the response is the actual image sitemap.
I have attached the archive. Anybody can use it as is or tweak it.