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 "Frizzell, Michael A" <mi...@eds.com> on 2002/06/28 20:09:29 UTC
My environment is J2se 1.4.0_01
This is using the lastest batik 1.5beta3.
The problem is that whenever I use the "use" tag I get this error thrown:
Exception:org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
null:-1
The URI '' specified on the element <use> is invalid
The files being run are included. This only occurs when I build the xml dom
Document on the fly and then send it to the Transcode. The svg file included
is the export output when the svg dom is printed out. This svg file when
sent to a generic raster builds the jpg file. Any help would be appreciated.
<<useTest.class>> <<useTest.java>> <<useTest.svg>> <<useTest.jpg>>
Btw, in use test, the constructor tells the svg tag how big to make the
graphic area. The Blob_define returns a defs element that contains a
polyline and ellipse (making the blob). The addBlob just creates a "use"
tag, with two attributes, and transform and and xlink:href which... by the
w3c spec is how one would use a "templated" section of SVG tags. Thanks...
Mike
Posted by Thomas E Deweese <th...@kodak.com>.
>>>>> "FMA" == Frizzell, Michael A <mi...@eds.com> writes:
FMA> My environment is J2se 1.4.0_01 This is using the lastest batik
FMA> 1.5beta3.
FMA> The problem is that whenever I use the "use" tag I get this error
FMA> thrown:
FMA> Exception:org.apache.batik.transcoder.TranscoderException:
FMA> null Enclosed Exception: null:-1 The URI '' specified on the
FMA> element <use> is invalid
The problem is the line:
use_tag.setAttributeNS(null,"xlink:href","#Blob_red");
This sets the attribute 'xlink:href' in the default namespace (
the SVG Namespace). I think you want:
private final static String xlinkNS = "http://www.w3.org/1999/xlink";
[...]
use_tag.setAttributeNS(xlinkNS,"href","#Blob_red");
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org