xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gorzsás Tamás <Gorzsas.Ta...@evosoft.hu>
Subject RE: referred <def> element is not displayed
Date Fri, 06 Jan 2006 08:54:47 GMT
Hi Andrew,

It helped.

thanks a lot,

-----Original Message-----
From: Andrew Plotkin [mailto:erkyrath@eblong.com] 
Sent: 2006. január 5. 18:05
To: batik-users@xmlgraphics.apache.org
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


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


"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: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message