
On 6/27/07, Gail Banaszkiewicz <gbanaszk@...1686...> wrote:
Create a new text object with some text in it. Make sure it is visible (i.e. not in the defs). Create a second text object with nothing inside except a use element that refers to the first text object.
I'm not sure this is meaningful. A <use> is defined as something which is replaced by the "shadow copy" of the subtree it references. In this case, placing <use> that refers to <text> inside another <text> is equivalent to creating nested <text> element. But from my reading of SVG spec, this is not allowed. Only tspan, tref, textPath, altGlyph are included in %SVG.TextContent.class; as you can see at http://www.w3.org/TR/SVG11/text.html#id5191993. So, for example, Batik does not display the text with such <use> at all.
So, while Inkscape's behavior is weird in this case, it's not something that has any real world significance. We don't claim to correctly render invalid files :)
As for the jumping, it is I think caused by the fact that the <text> containing the <use> has its own x/y attributes, and Inkscape gets confused as to which x/y to use for the cloned nested text. In any case, this is quite different from a tref because tref copies over only character data, not any x/y or transforms, from the source it refers to. In fact, tref is very similar to tspan which we support more or less correctly, except that in tref the character data comes from a different place - so perhaps you should base your tref code on tspan because they are quite similar.