thanks and sorry.


From: Thomas DeWeese <[EMAIL PROTECTED]>
Reply-To: "Batik Users" <[EMAIL PROTECTED]>
To: Batik Users <[EMAIL PROTECTED]>
Subject: Re: problem with image tag
Date: Thu, 09 Oct 2003 12:45:03 -0400

Ian Ross wrote:

hi
Sorry to bother u guys again. But its 2:30 am and i need to get this done by tomorrow.
Im trying to inlcude a jpeg in my svg using the following


Element tag = document.createElementNS(svgNS, "image");
tag.setAttributeNS(null, "xlink:href", "Urgent.jpeg");
tag.setAttributeNS(null, "id", classifierObject.getId()+classifierObject.getSqn());
tag.setAttributeNS(null, "x", "-"+Integer.toString((width/2)+2));
tag.setAttributeNS(null, "y", Integer.toString(height/2));


but i keep getting the following error

null:-1
The attribute 'xlink:href' of the element <image> is required.

Any ideas?

Try reading the FAQ:


Finally, for attributes which belong to a specific namespace, like
the the href attribute on the <image> element, you have to use the
setAttributeNS method with the XLink namespace. For example, assuming
img references an <image> DOM Element, you can modify the href as
follows:
   img.setAttributeNS(xlinkNS, "xlink:href", "myImage.jpg")

where xlinkNS is equal to "http://www.w3.org/1999/xlink";





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


_________________________________________________________________
Get less junk mail with ninemsn Premium. Click here http://ninemsn.com.au/premium/landing.asp



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



Reply via email to