
bulia byak wrote:
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 :)
This is fair :)
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.
That's exactly what I've been trying to do. I want the tref to pretty much be a tspan and have modeled most of the new code after it; I took only what was absolutely necessary from the use code (i.e. the actual referencing stuff). At first, I didn't think it would be necessary to have the node being referenced as a child in the same way as the use element does it, but I couldn't see how else to have it automatically use the text content of the object it referred to. However, this does lead to the same situation you described above. Namely, the nested text thing.
However, it's starting to sound to me like the only valid option is to literally copy the text over and update it when the original changes. I had been avoiding that because duplication is evil, but there are several issues surrounding doing is any other way. Without getting into those issues right off hand, what is your opinion of this approach? Is that what you pictured all along?
Gail