Hi Thomas,
Thanks for the reply :) I was still worrying that my problem could not be solve.
>I would suggest that you provide a base URL either by setting the xml:base attribute
>(in the xml namespace), or by calling 'batik.dom.svg.SVGOMDocument.setURLObject(URL)'
>(in the xml namespace), or by calling 'batik.dom.svg.SVGOMDocument.setURLObject(URL)'
Yup, I am constructing the SVG document directly from memory. Regarding the 2 solutions you have provided, do you mind giving simple examples as to how do I set the xml namespace or where to call 'batik.dom.svg.SVGOMDocument.setURLObject
(URL). Actually I am quite new to batik and java :p, is there any sites where I can refer to sample batik codes to help me learn coding using batik better? Really appreciate your help!
On 6/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:
Hi Kok Eng Meo,
Please only send messages to one list, in this case the 'users' list
since you are not developing Batik, you are developing code that uses
Batik.
"kok eng meo" <[EMAIL PROTECTED]> wrote on 06/22/2006 03:52:58 AM:
> I have tried to create an image Element in batik to display a jpeg file.
But
> it does not work.
> This is my code.
I don't see any obvious problems (points for getting
the namespace stuff "first try").
> abc.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI , "xlink:href",
"picture.jpg");
> The error given is an I/O error occurred while processing the URI
Ohh, you just lost the points for not including the I/O
error stack trace ;)
I/O error covers a lot, my first guess is that it can't find the
JPEG. If you are constructing the SVG document entirely in memory
(nothing read from disk) the document likely has no 'base URL' to
resolve relative URL's (like " picture.jpg"). I would suggest that
you provide a base URL either by setting the xml:base attribute
(in the xml namespace), or by calling
'batik.dom.svg.SVGOMDocument.setURLObject(URL)'
> Can someone please advice me on this?? Or is there any other methods to
> display a jpeg file inside batik SVGDocument.
No this is it...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
