Gavin,

Assume no plugins and no interactivity and lots of bandwidth. I was hoping someone already had a applet and a servlet already written up. I'm not sure how to pass a large SVG document to an applet or a servlet. Would you do it as a quoted string? Yikes!

I wanted to embed the SVG code in the XML code that I am presetnly using with a dynamic XSLT to dynamically product HTML. This seems to make sense for Mozilla with built-in SVG support. But for IE? Hmmm... I suppose I could sniff the browser type and if it is IE, extract the embedded SVG code (out of the XML) into a temporary file and have the servlet or applet (using the URL class, I suppose) snatch it an render it. Yuck!

How do I know when it is safe to delete the SVG file? Writing to temp files is slow..

How would I do it with a servlet? This looks ugly too: <IMG SRC=""1.0"> SVG code goes here...."/>

Wow! That is one long and ugly IMG tag! There has got to be a better way!

  Thanks,

            Siegfried

 [EMAIL PROTECTED] wrote:

Hi Siegfried,
  How you present your graphics to your users depends on
    1. How much bandwidth they have
    2. Whether they are willing/able to use a plugin
    3. How much interaction they require.
 
Shipping a png/jpg to the client is simple in Batik and by far the fastest, for complex datasets, but has the least interactivity.  Some people can't/won't use plugins.  The simplest way to render SVG is normally the adobe plugin (as it is fairly lightweight), however your scripting capacity is limited.  You could use batik as an applet but that requires the java plugin and it's about 5MB download (though only the first time).  Lastly you can use java web start which is fine but you lose web browser access.
 
Creating an applet from batik is straightforward.  Just like any other applet except it must be signed.
 
Gavin Walker

[EMAIL PROTECTED]                        Computer Scientist
CSIRO Mathematical and Information Sciences
Distributed Information Systems
GPO Box 664                                  tel: +61 2 6216 7030
CANBERRA  ACT  2601   AUSTRALIA              fax: +61 2 6216 7111



Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

Reply via email to