Inscape should include !DOCTYPE

Bug #1168860 reported by Paul Robinson
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Undecided
Unassigned

Bug Description

Inscape does not generate a !DOCTYPE identifier on files it outputs. The following example on what an SVG file looks like comes from Wikipedia: http://commons.wikimedia.org/wiki/SVG_examples
and they also include help on how to use SVG files on their wiki: http://commons.wikimedia.org/wiki/Help:SVG

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg xmlns="http://www.w3.org/2000/svg" version="1.1"
      width="120" height="120" viewBox="0 0 236 120">
  <rect x="14" y="23" width="250" height="50" fill="green"
      stroke="black" stroke-width="55"/>
</svg>

Even the small examples they give have doctype identifiers, and I think Inkscape should accept and pass-through an existing !DOCTYPE if the file has one, or else add one if not (or update it if we're generating at a different level of the standard). I think it would be similar to this if we're complying with version 1.0 of the SVG standard:

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" >

Or the example at the top if it's 1.1

It would also let any other program that gets one of the SVG files generated by Inkscape as to which version of the standard the files are being built under.

Tags: saving
Revision history for this message
karenmenezes (karen-menezes) wrote :

The SVG spec does not recommend added a Doctype to SVG files... So is it really necessary? See below:
"While a DTD is provided in this specification, the use of DTDs for validating XML documents is known to be problematic. In particular, DTDs do not handle namespaces gracefully. It is not recommended that a DOCTYPE declaration be included in SVG documents."

Source here: http://www.w3.org/TR/SVG11/intro.html

Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.