Inkscape starts writing even cleaner SVG files

Tavmjong Bah has just merged part of a Google Summer of Code 2011 project by Abhishek Sharma that improves Inkscape's SVG output. Abhishek wrote the core routines to which Tav added a variety of utility functions. This code can result in having cleaner and smaller SVG files produced by Inkscape. For each rect and path element it checks whether all attributes are valid, whether properties are appropriate and whether those properties are useful.

What Inkscape does when it finds a problem is controlled by settings under the "SVG output" section of the Inkscape's Preferences dialog. For each of the above cases, you can independently have warnings printed out to the console or have invalid or not useful items deleted. In the dialog you can choose, when Inkscape should test the SVG: when reading files, when editing files, when writing files.