On Sat, 2007-07-07 at 12:28 -0300, bulia byak wrote:
> On 7/7/07, MenTaLguY <mental@...> wrote:
> > Once we have the infrastructure to find all the IDs and references in
> > the pasted fragment,
> And what remains to be done for this infrastructure to work?
Well, we need to finish implementing it first. But we have some of it
already, in the form of SPDocument.
Part of the problem right now is that we do our imports and clipboard in
terms of XML::Documents rather than SPDocuments, but XML::Documents
don't know about ids or styles or any of that (SPDocuments do). So,
switching the SVG import and clipboard code to each use an SPDocument
rather than a bare XML::Document would be an important first step.
Then we just need an method somewhere for copying a list of SPObjects
(and their descendants and the objects they href) from one SPDocument to
another, where the ID fixups can be done, based on looking up IDs in the
source and destination SPDocuments.