xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Neumann <neum...@karto.baug.ethz.ch>
Subject Re: Displaying JPEG file in SVG in batik
Date Thu, 22 Jun 2006 08:04:14 GMT
Hi,

I only know this from the javascript perspective, but DOM manipulations 
seem to be the same.

If you specify xlink:href and use .setAttributeNS() and the xlink 
namespace you only have to specify "href" instead of "xlink:href". I 
don't know if that is the cause of your problem. Otherwise I would check 
the pathes and filenames if they are correct.

Andreas

kok eng meo wrote:

> I have tried to create an image Element in batik to display a jpeg 
> file. But it does not work.
> This is my code.
>  
>  
> String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
> .......
> Element abc = document.createElementNS(svgNS, "image");
> abc.setAttributeNS(null, "x", "10");
> abc.setAttributeNS(null, "y", "10");
> abc.setAttributeNS(null, "width", "300");
> abc.setAttributeNS(null, "height", "300");
> abc.setAttributeNS(XMLConstants.XLINK_NAMESPACE_URI, "xlink:href", 
> "picture.jpg");
> ..........
>  
> The error given is an I/O error occured while processing the URI
>  
> Can someone please advice me on this?? Or is there any other methods 
> to display a jpeg file inside batik SVGDocument. Thanks alot!!!!



-- 
----------------------------------------------
Andreas Neumann
Institute of Cartography
ETH Zurich
Wolfgang-Paulistrasse 15
CH-8093  Zurich, Switzerland

Phone: ++41-44-633 3031, Fax: ++41-44-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.carto.net/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/


---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Mime
View raw message