I admit to having absolutely no idea about the architecture of Batik, but have spent a lot of time with SharpVectorGraphics on C# (including re-implementing this feature).
I have looked through the sources and (as near as I can tell), the functionality could be built out, at least partially, with relative ease. From last night's CVS, I think you could create and attach the an SVGElementInstance within SVGUseElementBridge.java line just after line 192. just after:
ue.setCSSImportedElementRoot(root);
Essentially you would connect this created instance to the function getInstanceRoot() inside of the SVGOMUseElement. I assume that there is concern about two things: (1) memory leaks: There is a chance that (a) the created SVGElementInstance will need to be disposed. This can be handled when the <use> is disposed or the bridge node is recreated. (b) There is a chance that the dual references will hinder garbage collection (e.g. SVGElementInstance refers to both the use and localRefElement)-- I am not sure how to overcome this without knowing more about the architecture... any ideas? (2) modifying the EventTarget apparatus for <use> and the referenced element to supply the SVGElementInstance as the target instead of the referenced node.
Additionally, browsing the code it seems that in cases where the referenced element is not a <symbol> and not an <svg> the referenced node is returned as is... should it not be wrapped in a <g>? It could be doing this and I am missing it...
Any help would be great-- I would even be willing to help implement this feature correctly if I had some admin/lead hand-holding :)
Thanks, Jeff Rafter
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
