I have one SVG created in Inkscape. It has a layer* containing rectangles which define clipping boundaries. It has multiple other layers containing the elements that I want to end up rendered into images. The output that I'm looking for is one image (probably png) for each combination of (a clipping rectangle in the first layer) * (a layer other than the first). The contents of that image will be equivalent to using Export Selection in Inkscape, with the clipping rectangle selected and the other layer being the only visible layer. The name of the image will be some combination of identifying information (id, title, label, etc) from the rectangle and the other layer.
How can I automate this? Doing it manually through Inkscape's Export interface is getting more time consuming each time I add a layer or a new clipping rectangle..
* I believe a Layer in Inkscape is implemented in SVG as a group.