Hi Andrew,

It helped.

thanks a lot,
Tamas

-----Original Message-----
From: Andrew Plotkin [mailto:[EMAIL PROTECTED] 
Sent: 2006. január 5. 18:05
To: [email protected]
Subject: Re: referred <def> element is not displayed

On Thu, 5 Jan 2006, Gorzss Tams wrote:

> if I place a <use> element in the svg file, the icon will be displayed.
>
>    <use id="T_3_0_0" xlink:href="#train-1-purple" x="0" y="0" />
>
> if I try to place it from code, it won't be displayed.
>
>
>    Element trainImage = canvas.getSVGDocument().createElementNS(
>    SVGDOMImplementation.SVG_NAMESPACE_URI, SVGConstants.SVG_USE_TAG); 
>
>    trainImage.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI,
>    "xlink:href", "#train-1-purple");

I don't know if this is the problem, but the code I use to do this passes 
"href" as the attribute, rather than "xlink:href". You're effectively 
setting the namespace twice -- maybe that comes out to "xlink:xlink:href" 
in the DOM.

I also have

    xmlns:xlink="http://www.w3.org/1999/xlink";

in the top-level <svg> -- just in case you're missing that.

--Z

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..."
*
Making a saint out of Reagan is sad. Making an idol out of Nixon ("If the
President does it then it's legal") is contemptible.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to