On Thu, 11 Oct 2007 11:31:47 +0200, Chris Lilley <chris@...214...> wrote:
However, detecting a potential id conflict between the current document and the copy/paste buffer when paste is selected (and warning, offering to fix up the conflicts before pasting) would be a nice feature.
Yes; unfortunately the existing copy/paste implementation just blindly mashes an XML fragment into the target document. ID conflicts are detected and resolved by the target document, but at that point it is too late to update references to conflicting objects.
The copy/paste code needs to be rewritten to work at the SVG object model level (SPObject) rather than at the XML level, so that the required knowledge to update all the various reference attributes and properties is available, and can be done in advance. That's basically the "grand plan" bulia was alluding to.
(It would be nice if the copy/paste stuff integrated with the system clipboard as well.)
-mental