On Sat, 25 Jun 2005, MenTaLguY wrote:
Date: Sat, 25 Jun 2005 13:01:23 -0400 From: MenTaLguY <mental@...32...> To: Alan Horkan <horkana@...3...> Cc: Inkscape Users List inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] cleaner markup SVG ellipse rect polygon?
On Sat, 2005-06-25 at 17:06 +0100, Alan Horkan wrote:
I dont believe it is impossible but are you sure is it really as widly impractical as you are suggesting it would be?
It's seriously not easy right now. We're just not set up for renaming XML elements attached to live objects.
Basically the way it would have to be done currently is to delete the existing XML node and recreate it from scratch with the new element name. Which would result in the SPItem getting torn down and rebuilt too. It'd be hard to maintain the current selection everywhere, etc, etc...
Okay clearly that is nasty.
I've been working out how to permit renaming elements without tearing down SPItems, but there are a lot of subtle gotchas that I've not managed to solve yet.
(Most notably, it opens the door to needing to effectively change the class of an SPItem on the fly. Particularly in the ellipse <-> path[sodipodi:type="arc"] case. C++ doesn't really do that though.)
One last try, would it be any less nasty to try and get the Plain SVG exporter to recognise when rect, ellipse, etc could be used and output cleaner markup as appropriate?
Thanks for making the effort to explain things.
Sincerely
Alan Horkan
Inkscape http://inkscape.org Open Clip Art http://OpenClipArt.org
Alan's Diary http://advogato.org/person/AlanHorkan/