A new update to the RELAX-NG to SVG stylesheets was uploaded today. This update provides new options to create a key for the SVG diagram. Keys can be either static (a fixed box displayed at the foot of the diagram) or animated (an SVG "button" which displays the key when clicked on).

Read more on the stylesheets here.

Grab the latest distribution (ZIP file) from here.