You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by th...@kodak.com on 2008/02/07 02:43:58 UTC
RE: element use, attribute transform doesn't work
Hi Michael, Massimo,
"Bishop, Michael W. CONTR J9C880" <Mi...@je.jfcom.mil> wrote on
01/23/2008 01:05:31 PM:
> I don't know how your document is configured, but try setting the
> transform in the SVG namespace.
Don't do that. With the notable exception of the
xlink attributes (i.e. xlink:href) all of the SVG attributes
are in the null namespace.
> > if the element is in the svg file everything is ok
> >
> > <use xlink:href="/home/cits/source.svg#s_7"
> > transform="translate(100,300)" >
> >
> > if I try to use that from java code, I get the error
> >
> > The attribute "transform" of the element <use> is invalid
My first and only guess would be some problem with locale
settings. So the transform ends up being parsed as 100.3
(comma vs period decimal separator problem).
> > Element el = document.createElementNS(svgNS, "use");
> > el.setAttributeNS(null, "id", id+"instance");
> > el.setAttributeNS(null ,"transform", "translate(100,100)");
> > el.setAttributeNS(org.apache.batik.util.XMLConstants.XLINK_NAM
> > ESPACE_URI, "href", link);
> > document.getElementById(id).appendChild(el);
I don't see how that could happen of course with the
above code.