Maybe not entirely necessary, but just for completeness the library should have a way of producing a DOCTYPE declaration.
e.g.
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
I may decide to work on this myself, but if you don't hear from me in a year, then I forgot about this.