On Mon, 7 Feb 2005 mental@...3... wrote:
Date: Mon, 7 Feb 2005 14:47:43 -0500 From: mental@...3... To: Alan Horkan <horkana@...44...> Cc: Inkscape is a vector graphics editor inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Unable to open SVG in Inkscape
Quoting Alan Horkan <horkana@...44...>:
Seems odd that such a minor deviation would cause Inkscape to fail. I guess I would have expected the stray ) to simply be ignored.
Presumably this indicates a greater underlying problem?
No, it's working as designed. The XML standard doesn't permit a ) there, full stop. We don't want to enter the morass of permissive-by-default parsing.
Given the abomination that is Internet Explorer I can undestand the need to be strict about imports.
Now, what would be nice is if a file fails to load due to invalid XML, the user gets a dialog like this:
I'd go for a slightly more terse wording (and I wouldn't bother saying try or automatic) but this is an excellent idea.
This file is damaged, would you like to repair it? | Cancel | [ Repair Document ]
..at which point Inkscape would retry parsing the file with a more "permissive" XML parser, and mark the document as dirty when first loaded. Similar actions for other gross violations of validity might be nice too.
I was trying to think of something like this but you figured out the improtant part about marking the document dirty (or alternatively giving it a whole new name).
One important property of the "permissive parser" would be to preserve anything it doesn't understand as an XML comment (rather than throwing it away), to permit further hand-recovery if the automatic recovery isn't sufficient.
that sounds like an excellent feature.
- Alan H.