You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Bill Haneman <bi...@ireland.sun.com> on 2001/02/01 23:10:00 UTC

tref inheritance

Hi folks:

In tracking down the source of the tref text selection bug,
I have discovered that tref elements do not appear to 
inherit properties as I expect.

For instance in this example:

<text x="100">
    <tref xlink:href="some_url"/>
<text>

there is no "x" attributed defined on the tref element
(I don't mean the referenced element, I mean the tref element
itself).

Can someone explain this?  I would have thought that tref would
inherit from the text parent, and that the tref's content
(including other attributes, which might override those that
were inherited) would come from the URI.

In the example above, tref needs to inherit "x" in order to
give the text element the appropriate attributes.  If you 
change the example to

<text>
    <tref x="100" xlink:href="some_url"/>
</text>


then it works, the explicit attributed on tref are found 
when building the text string's attribute map - so it
seems reasonable that the tref _inherited_ attributes should
be visible also...  but they are not, if I try to
get the CSS attribute "x", it is undefined on the
first example though defined in the second.

-Bill
--------------
Bill Haneman
+1 353 1 849 0495